Skip to content

Instantly share code, notes, and snippets.

@vagnernogueira
Last active February 6, 2020 05:45
Show Gist options
  • Save vagnernogueira/e0697b47e262492f79b9 to your computer and use it in GitHub Desktop.
Save vagnernogueira/e0697b47e262492f79b9 to your computer and use it in GitHub Desktop.
Aliases in .bashrc on CentOS7
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# after edit file, type:
# $ source ~/.bashrc
# User specific aliases and functions
if [ $UID -ne 0 ]; then
alias reboot='sudo reboot'
alias update='sudo yum update'
alias yum='sudo yum'
alias systemctl='sudo systemctl'
alias reboot='sudo /sbin/reboot'
alias poweroff='sudo /sbin/poweroff'
alias halt='sudo /sbin/halt'
alias shutdown='sudo /sbin/shutdown'
alias firewall-cmd='sudo firewall-cmd'
fi
alias la='ls -la'
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../..'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias bc='bc -l'
alias h='history'
alias j='jobs -l'
alias path='echo -e ${PATH//:/\\n}'
alias now='date +"%T"'
alias nowdate='date +"%d-%m-%Y"'
alias vi=vim
alias svi='sudo vi'
alias svim='sudo vim'
alias vis='vim "+set si"'
alias edit='vim'
alias ports='sudo netstat -tulanp'
alias c='clear'
alias cla='clear;la'
alias cll='clear;ll'
alias cls='clear;ls'
alias clal='clear;lal'
alias l='ls'
alias la='ls -la'
alias ll='ls -ltr'
alias lal='ls -al'
alias ls='ls -F'
alias sl='ls'
alias psg='ps aux | grep'
alias lsg='ls -l | grep'
alias tf='tail -f'
alias tfn='tail -fn'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment