Difference between revisions of "Pacman Aliases"

From ArchWiki
Jump to navigation Jump to search
m (Notes: Added link to [Post Installation Tips])
m
Line 25: Line 25:
 
To install a specific package, type:
 
To install a specific package, type:
 
  $ pacin <packagename>
 
  $ pacin <packagename>
 +
To remove a package, type:
 +
$ pacout <packagename>
 
To search for packages, type:
 
To search for packages, type:
 
  $ pac <keywords>
 
  $ pac <keywords>
  
 
==Notes==
 
==Notes==
The aliases used above are just examples.  If desired you can call the alias whatever you like.
+
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 [[Post_Installation_Tips#Timesaving_Command-aliases|Timesaving Command aliases]].
 
For other useful aliases have a look at [[Post_Installation_Tips#Timesaving_Command-aliases|Timesaving Command aliases]].

Revision as of 23:42, 29 January 2008


Summary

The following instructions allow users to run some of the more common pacman commands without the need to type them fully.

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.

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>

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.