Colorindo seu terminal.
Que tal deixar o seu terminal um pouco mais colorido, modificando todas as cores? Que tal deixá-lo todo verde, estilo Matrix!? Ou melhor ainda, que tal personalizar as cores de seu terminal de acordo com suas preferências? Esse artigo lhe mostra o caminho certo para se fazer isso.
Criando os arquivos necessários
Para colorir nosso terminal, teremos que editar apenas estes arquivos:
Caso você não tenha algum deles, pode criá-los com o comando touch:
$ touch $HOME/.bash_login
$ touch $HOME/.bashrc
Agora edite o arquivo /etc/DIR_COLORS e deixe-o com o seguinte conteúdo:
# vim /etc/DIR_COLORS
- ~/.bash_login
- ~/.bashrc
- /etc/DIR_COLORS
Caso você não tenha algum deles, pode criá-los com o comando touch:
$ touch $HOME/.bash_login
$ touch $HOME/.bashrc
Agora edite o arquivo /etc/DIR_COLORS e deixe-o com o seguinte conteúdo:
# vim /etc/DIR_COLORS
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
# -b = better support for special characters
OPTIONS -F -b -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM linux-c
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM Eterm
TERM gnome
TERM rxvt
TERM screen
TERM screen-w
TERM xterm
TERM vt100
TERM vt102
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
# executables (bright green)
.bat 01;32
.BAT 01;32
.btm 01;32
.BTM 01;32
.cmd 01;32
.CMD 01;32
.com 01;32
.COM 01;32
.dll 01;32
.DLL 01;32
.exe 01;32
.EXE 01;32
# archives or compressed (bright red)
.arj 01;31
.bz2 01;31
.deb 01;31
.gz 01;31
.lzh 01;31
.rpm 01;31
.tar 01;31
.taz 01;31
.tb2 01;31
.tbz2 01;31
.tbz 01;31
.tgz 01;31
.tz2 01;31
.z 01;31
.Z 01;31
.zip 01;31
.ZIP 01;31
.zoo 01;31
# multimedia (video/image/sound) file formats
.asf 01;35
.ASF 01;35
.avi 01;35
.AVI 01;35
.bmp 01;35
.BMP 01;35
.flac 01;35
.FLAC 01;35
.gif 01;35
.GIF 01;35
.jpg 01;35
.JPG 01;35
.jpeg 01;35
.JPEG 01;35
.m2a 01;35
.M2a 01;35
.m2v 01;35
.M2V 01;35
.mov 01;35
.MOV 01;35
.mp3 01;35
.MP3 01;35
.mpeg 01;35
.MPEG 01;35
.mpg 01;35
.MPG 01;35
.ogg 01;35
.OGG 01;35
.ppm 01;35
.rm 01;35
.RM 01;35
.tga 01;35
.TGA 01;35
.tif 01;35
.TIF 01;35
.wav 01;35
.WAV 01;35
.wmv 01;35
.WMV 01;35
.xbm 01;35
.xpm 01;35
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
# -b = better support for special characters
OPTIONS -F -b -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM linux-c
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM Eterm
TERM gnome
TERM rxvt
TERM screen
TERM screen-w
TERM xterm
TERM vt100
TERM vt102
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
# executables (bright green)
.bat 01;32
.BAT 01;32
.btm 01;32
.BTM 01;32
.cmd 01;32
.CMD 01;32
.com 01;32
.COM 01;32
.dll 01;32
.DLL 01;32
.exe 01;32
.EXE 01;32
# archives or compressed (bright red)
.arj 01;31
.bz2 01;31
.deb 01;31
.gz 01;31
.lzh 01;31
.rpm 01;31
.tar 01;31
.taz 01;31
.tb2 01;31
.tbz2 01;31
.tbz 01;31
.tgz 01;31
.tz2 01;31
.z 01;31
.Z 01;31
.zip 01;31
.ZIP 01;31
.zoo 01;31
# multimedia (video/image/sound) file formats
.asf 01;35
.ASF 01;35
.avi 01;35
.AVI 01;35
.bmp 01;35
.BMP 01;35
.flac 01;35
.FLAC 01;35
.gif 01;35
.GIF 01;35
.jpg 01;35
.JPG 01;35
.jpeg 01;35
.JPEG 01;35
.m2a 01;35
.M2a 01;35
.m2v 01;35
.M2V 01;35
.mov 01;35
.MOV 01;35
.mp3 01;35
.MP3 01;35
.mpeg 01;35
.MPEG 01;35
.mpg 01;35
.MPG 01;35
.ogg 01;35
.OGG 01;35
.ppm 01;35
.rm 01;35
.RM 01;35
.tga 01;35
.TGA 01;35
.tif 01;35
.TIF 01;35
.wav 01;35
.WAV 01;35
.wmv 01;35
.WMV 01;35
.xbm 01;35
.xpm 01;35