Advertisement
Jakobud

Helpful Linux Bash Aliases

Dec 17th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.54 KB | None | 0 0
  1. # Prompt
  2. PS1="\n\u@\h:\w\n# "
  3.  
  4. alias df='df -h'
  5. alias du='du -h'
  6.  
  7. ## Colorize the ls output ##
  8. alias ls='ls -h --color=auto --group-directories-first'
  9.  
  10. ## Use a long listing format ##
  11. alias ll='ls -la'
  12. alias l='ll'
  13.  
  14. ## Show hidden files ##
  15. alias l.='ls -dh .* --color=auto'
  16. alias lt='ll -t'
  17.  
  18. ## get rid of command not found ##
  19. alias cd..='cd ..'
  20.  
  21. ## a quick way to get out of current directory ##
  22. alias ..='cd ..'
  23. alias ...='cd ../../../'
  24. alias ....='cd ../../../../'
  25. alias .....='cd ../../../../'
  26. alias .4='cd ../../../../'
  27. alias .5='cd ../../../../..'
  28.  
  29. ## Colorize the grep command output for ease of use (good for log files)##
  30. alias grep='grep --color=auto'
  31. alias egrep='egrep --color=auto'
  32. alias fgrep='fgrep --color=auto'
  33.  
  34. # Start calculator with math support
  35. alias bc='bc -l'
  36.  
  37. # Generate sha1 digest
  38. alias sha1='openssl sha1'
  39.  
  40. # Create parent directories on demand
  41. alias mkdir='mkdir -pv'
  42.  
  43. # Command short cuts to save time
  44. alias h='history'
  45. alias j='jobs -l'
  46.  
  47. # Create a new set of commands
  48. alias path='echo -e ${PATH//:/\\n}'
  49. alias now='date +"%T'
  50. alias nowtime=now
  51. alias nowdate='date +"%d-%m-%Y"'
  52.  
  53. # Set vim as default
  54. alias svi='sudo vi'
  55.  
  56. # Stop after sending count ECHO_REQUEST packets #
  57. alias ping='ping -c 5'
  58. # Do not wait interval 1 second, go fast #
  59. alias fastping='ping -c 100 -s.2'
  60.  
  61. # Show open ports
  62. alias ports='netstat -tulanp'
  63.  
  64. # Resume wget by default
  65. alias wget='wget -c'
  66.  
  67. # top is atop, just like vi is vim
  68. alias top='atop'
  69.  
  70. # compression
  71. alias tar='\tar -zcvf'
  72. alias untar='\tar -zxvf'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement