Bash Colorization

From MineOS Wiki
Jump to navigation Jump to search

As of 0.4.4, MineOS implements BASH colorization.

Colors according to filetype

This results in a directory listing (ls / ll) showing directories in the BASH-standard color scheme:

  • blue => directories
  • cyan => symlinks
  • green => executable regular files
  • red => archives
  • white => other

Customizing / Removing Colors

Directory Listing

Colorization is a function of the ls command and can be disabled by commenting/removing the alias for ls in the /etc/profile file.


  1. alias ll='ls -l --color=auto' 2>/dev/null
  2. alias l.='ls -d .* --color=auto' 2>/dev/null
  3. alias ls='ls --color=auto' 2>/dev/null


Bash Prompt

A custom bash prompt is required when /etc/profile file exists. By default, when the file exists, the prompt is: PS1 = "\s-\v\$ "

which translates to bash-4.1.7#

Since this is often not a pleasant BASH prompt, it has been enhanced to use:


which is red for the root user, and green for all other users. It also displays the present working directory (base--not full), and finally the $ suffix (as shown in the above picture).

You may--if you choose--return to the default, uncolored prompt by removing the /etc/profile file (or by renaming/moving it).