Skip to content

Instantly share code, notes, and snippets.

@dlitz
Last active June 18, 2023 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlitz/f06f06e601aceb75c824ad1ae74077cf to your computer and use it in GitHub Desktop.
Save dlitz/f06f06e601aceb75c824ad1ae74077cf to your computer and use it in GitHub Desktop.
root's .bashrc., .profile, and .inputrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "$(dircolors)"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
#### Everything below added by dlitz ####
# more colors!
alias bridge='bridge --color=auto'
alias egrep='egrep --color=auto'
alias grep='grep --color=auto'
alias ip='ip --color=auto'
alias zgrep='zgrep --color=auto'
# common aliases
alias ipa='ip --color=auto -br addr'
alias ipl='ip --color=auto -br link'
alias ipr4='ip -4 --color=auto -br route'
alias ipr='ip -6 --color=auto -br route'
# Stuff to do if running interactively
case $- in
*i*)
# Save & restore multi-line history
HISTTIMEFORMAT='%F %T '
shopt -s lithist
;;
*) return;;
esac
if [ -e ~/.bashrc.local ]; then
. ~/.bashrc.local
fi
$if Bash
set bell-style none
#set enable-bracketed-paste On # This is now the default
set colored-stats On
#set completion-ignore-case On # More matches = more cumbersome
#set completion-map-case On
set blink-matching-paren On
#set match-hidden-files Off
$endif
$if Less
set bell-style none
$endif
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n 2> /dev/null || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment