Currently Viewing Posts Tagged color

Color Scheme for the command line of bash

When I install the Ubuntu server and ssh to the server, the default shell is bash.

It looks like below.

I prefer to have a colorful terminal window. So I goole it and find the solution:

  • open ~/.bashrc in an editor
  • copy this and add it at the end of .bashrc file:
PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '

  • save the file and restart bashrc:
source ~/.bashrc

After that, the terminal window changed as below:

The user name, host name, path have different colors.

 

Continue reading “Color Scheme for the command line of bash”

Bashrc is not loading? (Fixed)

I have the .bashrc file, but it is not loading when I connect my VPS through SSH.

The content of .bashrc looks like below:

alias ls='ls --color=auto'
force_color_prompt=yes
PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '

It provides a colorful terminal look.

How to fix the problem of .bashrc not loading?

Continue reading “Bashrc is not loading? (Fixed)”

  • Archives