Pacman: Difference between revisions

From Leo's Notes
This page was last edited on 1 October 2019, at 20:19.
m Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux"
m formatting
Line 1: Line 1:
Pacman is the package manager for arch linux.
Pacman is the package manager for Arch Linux.


== Introduction ==
== Introduction ==
Configuration files are stored in {{code|/etc/pacman}}


Configuration files are stored in /etc/pacman
=== Updating Databases ===
=== Updating Databases ===


Similar to a {{code|yum clean all ; yum update}} you can update the repository information by running:
Similar to a {{code|yum clean all ; yum update}} you can update the repository information by running:
pacman -Syy
{{highlight|lang=terminal|code=
# pacman -Syy
}}


=== Searching ===
=== Searching ===
Search for a package
Search for a package
pacman -Ss packageName
{{highlight|lang=terminal|code=
# pacman -Ss packageName
}}


=== Installing ===
=== Installing ===
pacman -S packageName groupName
{{highlight|lang=terminal|code=
# pacman -S packageName groupName
}}


=== Updating System ===
=== Updating System ===
pacman -Syu
{{highlight|lang=terminal|code=
 
# pacman -Syu
}}
=== Removing a Package ===
=== Removing a Package ===
pacman -R packageName
{{highlight|lang=terminal|code=
 
# pacman -R packageName
}}
With dependencies
With dependencies
pacman -Rsc packageName
{{highlight|lang=terminal|code=
 
# pacman -Rsc packageName
}}


=== Searching for whatprovides ===
=== Searching for whatprovides ===
Install the pkgfile utilitiy
Install the pkgfile utilitiy
pacman -S pkgfile
{{highlight|lang=terminal|code=
 
# pacman -S pkgfile
}}
Update the repo:
Update the repo:
pkgfile --update
{{highlight|lang=terminal|code=
 
# pkgfile --update
}}
Then to search:
Then to search:
pkgfile -s lspci
{{highlight|lang=terminal|code=
core/pciutils
# pkgfile -s lspci
core/pciutils
}}


=== Searching Package Ownership ===
=== Searching Package Ownership ===
When given a path (eg. /usr/bin/startx), you can find which package provided the file by using:
When given a path (eg. /usr/bin/startx), you can find which package provided the file by using:


pacman -Qo /usr/bin/startx
{{highlight|lang=terminal|code=
# pacman -Qo /usr/bin/startx
}}


This is similar to RPM's {{code|rpm -qf /usr/bin/startx}}.
This is similar to RPM's {{code|rpm -qf /usr/bin/startx}}.

Revision as of 20:19, 1 October 2019

Pacman is the package manager for Arch Linux.

Introduction

Configuration files are stored in /etc/pacman

Updating Databases

Similar to a yum clean all ; yum update you can update the repository information by running:

# pacman -Syy

Searching

Search for a package

# pacman -Ss packageName

Installing

# pacman -S packageName groupName

Updating System

# pacman -Syu

Removing a Package

# pacman -R packageName

With dependencies

# pacman -Rsc packageName

Searching for whatprovides

Install the pkgfile utilitiy

# pacman -S pkgfile

Update the repo:

# pkgfile --update

Then to search:

# pkgfile -s lspci
core/pciutils

Searching Package Ownership

When given a path (eg. /usr/bin/startx), you can find which package provided the file by using:

# pacman -Qo /usr/bin/startx

This is similar to RPM's rpm -qf /usr/bin/startx.