Difference between revisions of "Linux command: alias"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) m (Protected "Linux command: alias" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
Rafahsolis (talk | contribs) |
||
| Line 15: | Line 15: | ||
alias vpn=/home/rafa/vpn.sh | alias vpn=/home/rafa/vpn.sh | ||
</nowiki> | </nowiki> | ||
| + | |||
| + | == Some usefull alias == | ||
| + | *alias h="history" # quick access to command history | ||
| + | *alias c="clear" # quick way to clear terminal screen | ||
| + | *alias grep="grep —color -n" # colorize matches; show line numbers | ||
| + | *alias df="df -h" # show free space using human readable units | ||
| + | *alias du="du -sh" # show disk usage using human readable units | ||
| + | *alias sc="source $HOME/.cshrc" | ||
| + | *alias gousb="cd $USBDRIVE_PATH" | ||
Revision as of 09:58, 8 April 2015
Create alias
alias imagenes='cd /media/discoduro/archivos/Pictures'
Create permanent alias
echo 'alias imagenes="cd /media/discoduro/archivos/Pictures"' >> ~/.bashrc && . ~/.bashrc
delete alias
unalias imagenes
see defined alias
alias
alias definition file
alias can also be defined in file ~/.bash_aliases.
Example ~/.bash_aliases
#!/bin/bash alias instala="sudo apt-get install" alias vpn=/home/rafa/vpn.sh
Some usefull alias
- alias h="history" # quick access to command history
- alias c="clear" # quick way to clear terminal screen
- alias grep="grep —color -n" # colorize matches; show line numbers
- alias df="df -h" # show free space using human readable units
- alias du="du -sh" # show disk usage using human readable units
- alias sc="source $HOME/.cshrc"
- alias gousb="cd $USBDRIVE_PATH"