QuickTip – Removing the hostname and username from Ubuntu Terminal

Sometimes for a demo, you would rather not show the username and hostname.

For that goto the .bashrc file and edit that with your favorite editor

$ vi ~/.bashrc

Add the following line in the end

export PS1="\W \$"

Save the modified bashrc with esc key + : +w+q

Close the terminal

Open a new terminal and now you just see the $ prompt

Leave a Reply

Your email address will not be published. Required fields are marked *