Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When you opens a terminal it displays the username and the machine name. As an example mine shows: romeo@romeo-Satellite-C660D:~$. It's really annoying because it's kinda big. Can i make this smaller, like, only show romeo?

I know it sounds stupid, but I'm new with Unix based OSes.

share|improve this question
up vote 19 down vote accepted

You need to alter PS1 variable in your environment. PS1 is responsible of how fancy your command prompt will look alike, and what information it will contain.

Permanent change

Following is the excerpt of default .bashrc file in Ubuntu 10.04 LTS:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

This makes command prompt look like this: username@hostname:~/directory$

If you change this and delete @\h part in PS1, you will get rid of hostname part in your command prompt:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    PS1='${debian_chroot:+($debian_chroot)}\u:\w\$ '

Result: username:~/directory$

Temporary change

Override PS1 in your current bash session:

export PS1="\u:\w\$ "


share|improve this answer
Thank you. I've managed to change it. – Romeo Mar 13 '13 at 14:55

See man bash and look for PS1.

To reduce the prompt to the user name, you can add this to your ~/.bashrc:

PS1='\u $'

Some "advanced" customizations see e.g. : Bash Shell PS1: 10 Examples to Make Your Linux Prompt like Angelina Jolie

share|improve this answer
export PS1='\t$'

since i prefer displaying as little background info as possible on the terminal i generally customize every session as a #, $, etc.

I also want to recommend a site where you can download a screen saver on your desktop.

enter image description here

share|improve this answer
How does this answer the question? – Zacharee1 Nov 5 '15 at 15:54

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.