Colorez votre shell prompt Ubuntu
source link: https://michael.bouvy.net/post/colorez-shell-prompt-ubuntu
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Colorez votre shell prompt Ubuntu
Par défaut, le shell prompt sous Ubuntu est extrêmement (trop) sobre. Pourtant, il est très simple d'avoir un prompt coloré comme c'est le cas par défaut sous Gentoo : il suffit d'éditer votre fichier .bashrc :
$ nano ~/.bashrc
Autour de la ligne 39, vous devriez avoir :
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
Il vous suffit de décommenter la ligne 39 et d'enregistrer votre fichier. Rechargez votre terminal, et miracle, votre prompt est désormais coloré :
Si vous souhaitez aller plus loin dans la personnalisation du prompt, vous pouvez modifier la valeur de PS1 dans le même fichier .bashrc, normalement ligne 53, à l'aide de cet article : http://www.gentoo.org/doc/en/articles/prompt-magic.xml.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK