welcome: please sign in
location: Shell


To set a colored bash shell, change /etc/bash.bashrc, change PS1 to:

   1 #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
   2 PS1='\n\e[1;37m[\e[m\e[1;32m\u\e[m\e[1;33m@\e[m\e[38;5;208;1m\H\e[m \e[38;5;171;4m`pwd`\e[m\e[1;37m]\e[m\e[1;36m\e[m\n\$'

Or add to ~/bashrc (with some more options enabled):

   1 # enable colors
   2 force_color_prompt=yes
   3 export LS_OPTIONS='--color=auto'
   4 export GREP_OPTIONS='--color=auto'
   5 eval "`dircolors`"
   6 alias ls='ls $LS_OPTIONS'
   7 export PS1='\n\e[1;37m[\e[m\e[1;32m\u\e[m\e[1;33m@\e[m\e[38;5;208;1m\H\e[m \e[38;5;171;4m`pwd`\e[m\e[1;37m]\e[m\e[1;36m\e[m\n\$'
   8 export EDITOR=vim

Then reload the profile or login again: source /etc/bash.bashrc ~/bashrc.

To enable this for all new users, modify /etc/skel/.bashrc as well.

A better git log ouput:

   1 git log --graph --pretty=format:"%C(auto)%h%Creset -%C(auto)%d %s %C(green)(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit


Byobu & tmux

Install byobu and tmux, byobu is in epel repo for CentOS.

To fix Crtl+Arrow features:

1. Put set-window-option -g xterm-keys on into ~/.byobu/.tmux.conf

2. Unbind keys from tmux, edit ~/.byobu/keybindings.tmux and add:

   1 unbind-key -n C-Left
   2 unbind-key -n C-Right

Shell (last edited 2017-04-18 07:55:03 by AstroProfundis)

How many stars in your bowl, How many sorrows in your soul?
CopyRight © 2011-2017 Allen Zhong, under a CC BY-NC-ND 4.0 License. | IPv6 Enabled.