Abarbarian
Acruncher
- Joined
- Sep 30, 2005
- Messages
- 11,023
- Reaction score
- 1,223
How to Create Aliases for Customizing Commands in Ubuntu
If you are new to linux then one useful tool to make life easier is the alias tool. The example in the article shows how to simplify a long command to a short usable one.
Here are a few of my own aliases.
The first alias on my list is a very useful one to implement as it takes away the need to always input a password if some sudo command requires it.
If you do make some aliases then always remember to,
as your normal user to allow you to use the alias without having to reboot.
If you do a lot of installations on your system and wish to avoid using the entire sudo apt-get install command, you can create a short alias for it using the following method:
If you are new to linux then one useful tool to make life easier is the alias tool. The example in the article shows how to simplify a long command to a short usable one.
Here are a few of my own aliases.
Code:
alias sudo="sudo " #Create an alias for sudo with a space at the end then all other aliases will work with #sudo.
alias w7="sudo mount /dev/nvme0n1p3 /mnt"
alias w7u="sudo umount /dev/nvme0n1p3"
alias ls="ls --color=auto"
alias x="startx"
alias pacu="pacaur -Syu"
alias paci="pacaur -S"
alias pacr="pacaur -Rns"
alias pacq="pacaur -Q"
alias pacor="pacaur -Rns $(pacman -Qtdq)"
alias rbs="firejail --private --dns=8.8.8.8 --dns=8.8.4.4 firefox -no-remote"
alias gf="grim-fandango"
alias ha="hangman"
alias boa="flatpak run com.realm667.WolfenDoom_Blade_of_Agony"
alias ss="scrot -s"
The first alias on my list is a very useful one to implement as it takes away the need to always input a password if some sudo command requires it.
If you do make some aliases then always remember to,
Code:
$ source ~/.bashrc
as your normal user to allow you to use the alias without having to reboot.