04-03-2011, 08:44 PM
I'm going to show you a way to change your username that appears in the terminal before every code that you execute. Mine looks like this:
Where i've replaced "Jason-m40sjd00sd8f ~ $".... with a whole bunch of random numbers and letters.... Into "Infinity ~ $"
Here's how you can do it too.
First open a terminal and type:
In .bashrc type:
Keep this document open for now.
Open another terminal and type:
You will end up with an output that looks something like \[\033[01;32m\]\u@\h\[\033[01;34m\] \w $\[\033[00m\]
copy the value that shows up into the .bashrc file and paste it into your .bashrc file in between the quotations in PS1=" ". From there, you'll now want to change the "\u@\h" to whatever you want your username to show up in the terminal.
Example:
If you followed everything correctly you should have the .bashrc file looking something like this:
Only instead of Infinity you will have your own username.
Where i've replaced "Jason-m40sjd00sd8f ~ $".... with a whole bunch of random numbers and letters.... Into "Infinity ~ $"
Here's how you can do it too.
First open a terminal and type:
Code:
sudo gedit ~/.bashrc
In .bashrc type:
Code:
PS1=" "
Keep this document open for now.
Open another terminal and type:
Code:
echo $PS1
You will end up with an output that looks something like \[\033[01;32m\]\u@\h\[\033[01;34m\] \w $\[\033[00m\]
copy the value that shows up into the .bashrc file and paste it into your .bashrc file in between the quotations in PS1=" ". From there, you'll now want to change the "\u@\h" to whatever you want your username to show up in the terminal.
Example:
Code:
\[\033[01;32m\]Infinity\[\033[01;34m\] \w $\[\033[00m\]
If you followed everything correctly you should have the .bashrc file looking something like this:
Code:
\[\033[01;32m\]Infinity\[\033[01;34m\] \w $\[\033[00m\]
Only instead of Infinity you will have your own username.