Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

migrated from Oct 10 '11 at 18:11

This question came from our site for professional and enthusiast programmers.

This isn't a programming question – Chris Oct 10 '11 at 18:09

2 Answers 2

If by "something like" you mean: '$' when normal user, '#' when root then put


in your .profile

Otherwise use

share|improve this answer
This makes a good point. You should use different prompts for root vs other users like CharString suggests. – chown Oct 10 '11 at 18:19

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.