In post, i will show you most used 10 Linux terminal aliases.
What is alias?
Alias is short way of writing commands on terminal.
How to add aliases?
This process is change according to your command shell.
If you are using bash (mostly used), you can add aliases to~/.bashrc
file.
If you are using Fish, you an add aliases yo~/.config/fish/config.fish
file.
1)alias c="clear"
- writec for clear
2)alias r="source ~/.bash_profile"
- writer for reload bash
3)alias del="rm -rf"
- writedel for recursive and force removing process.
4)alias untar="tar -zxvf"
writeuntar filename for unpack tar file
5) For update commandsalias update="sudo apt-get update"
for Debian based (Ubuntu...)alias update="sudo pacman -Syyu"
for Arch Linux based (Manjaro Linux...)alias update="yum update"
for Red Hat based (Fedora, CentOS, RHEL)
6) For installing an applicationalias app="sudo apt-get install"
for Debian basedalias pac="sudo pacman -S"
for Arch Linux based.alias app="dnf install"
for RHEL based.
7) Git add and commitgac "your message"
alias gac="git add . && git commit -a -m "
8) Installnode
packagesnis packagename
alias nis="npm install --save"
9) Make and enter inside a directorymkcd foldername
alias mkcd='foo(){ mkdir -p "$1"; cd "$1" }; foo '
10) Controlcd command behavioralias cd.1="cd .."
alias cd.2="cd ../.."
alias cd.3="cd ../../.."
alias cd.4="cd ../../../.."
alias cd.5="cd ../../../../.."
alias cd.6="cd ../../../../../.."
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse