How can I hide username@node in linux shell?

Posted on

Problem :

I want to hide username@solaris in a Unix shell.

I would like something like this:

$ ls -l

Instead I have this:

user@solaris:~$ ls -l

Solution :

If by “something like” you mean: ‘$’ when normal user, ‘#’ when root then put


in your .profile

Otherwise use


In /etc/bashrc or ~/.bashrc change the PS1 environment variable to PS1=$. Or add a new line if no PS1 already exists with:


Then, run this:

source /etc/bashrc


source ~/bashrc

Leave a Reply

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