In my terminal I am "thomas@thomas-Gazelle-Professional:~/
I just want it to be home/
How do I change it?
In my terminal I am "thomas@thomas-Gazelle-Professional:~/
I just want it to be home/
How do I change it?
This isn't going to be as easy as I thought. Somehow the "@thomas-Gazelle-Professional" was added to my user id. I don't know where to make that change!
You need to remove \h from the prompt. Remember that \u is your username \h is your hostname and \w is the current working directory.
To see what all those shortcuts mean, check the manual page for bash and scroll down to "PROMPTING"
Knowing what they do will help you edit the PS1 lines.Code:man bash
Thanks, but that didn't help. I think I need to actually find my username and change it. Here's the appropriate line from my bashrc:
else
#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS1="[ ${debian_chroot:+($debian_chroot)} \u: \w ]\\$ "
PS2="> "
and here is my command line:
thomas@thomas-Gazelle-Professional:~$
I want it to be :
thomas:~$
Wouldn't that be something like this? It leaves out the host name.
If you want to make the changes permanent then you'll have to edit .bashrc. Be sure to make a backup copy first, before you start editing.Code:PS1='\u: \w \$ '
Specifically, you can make that change permanent by running:
What you're trying to eliminate is the Hostname, which needs to be set to something. Changing the prompt is a much better way to do it.Code:PS1='\u: \w \$ ' cp ~/.bashrc ./bash-bak echo "PS1='\u: \w \$ '" | tee -a ~/.bashrc
Bookmarks