Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. If you want to add you own shortcuts (called alias) as available commands (could be your laptop or a server) just do the following :
  2.  
  3. ```
  4. alias YOURALIAS='full command'
  5. ```
  6.  
  7. **It usually goes to the .bashrc:**
  8.  
  9. ```
  10. sudo nano .bashrc
  11. ```
  12.  
  13. Here are some alias I use :
  14.  
  15. ```
  16. # SSH
  17. # implies that you have set SSH keys for a direct connection
  18. # useful ! You won't have to enter your password each time you want to access to your remote server
  19. alias sshmysite='ssh mylogin@mysite.com'
  20.  
  21. # browsing
  22. alias la='ls -alh --color=auto'
  23. alias ..='cd ..'
  24. alias ...='cd ../../../'
  25. alias ....='cd ../../../../'
  26. alias .....='cd ../../../../'
  27. alias .4='cd ../../../../'
  28. alias .5='cd ../../../../..'
  29.  
  30. # upgrade & update
  31. alias allupdate='sudo apt-get update && sudo apt-get dist-upgrade'
  32.  
  33. # tar
  34. # implies that you use .tar.gz files
  35. alias tarz="tar -cvfz"
  36. alias untarz=" tar -xvfz"
  37.  
  38. # rm
  39. alias rmdir="rm -rf"
  40.  
  41. # space check
  42. alias df='df -h'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement