Pacman Aliases
From ArchWiki
Contents |
[edit] Summary
The following instructions allow users to run some of the more common pacman commands without the need to type them fully.
[edit] Configure Bash
Open the bash config file in the editor of your choice, for example:
$ nano ~/.bashrc
Add the following lines:
# pacman upgrade alias alias pacup='sudo pacman -Syu' # Sync & Update alias pacin='sudo pacman -S' # Install a specific package alias pacout='sudo pacman -Rns' # Remove a specific package alias pac='pacman -Ss' # Search for a package
Save and exit.
[edit] Usage
You can now perform the respective commands by simply typing the alias name. For example: To synchronize the pacman database and do a system-wide update, type:
$ pacup
To install a specific package, type:
$ pacin <packagename>
To remove a package, type:
$ pacout <packagename>
To search for packages, type:
$ pac <keywords>
[edit] Notes
The aliases used above are just examples. If desired you can call the alias whatever you like, following the syntax above.
For other useful aliases have a look at Timesaving Command aliases.