Basic CLI

Here you will find some basic useful command line interface (CLI) commands for Arch Linux. Commands should apply to all Arch builds assuming you are using systemd. For additional flags, please view the man pages of any of the following applications.
________________________________________________________________________________________________________________

Package Management:

Pacman:

Update your system: pacman -Syu

Download a new package: pacman -S

Display information about a package: pacman -Si

Search for a locally installed package: pacman -Ss

Yaourt:

Update your system: yaourt -Syua

Download a new package: yaourt -S

Display information about a package: yaourt -Si

Systemd Commands

Systemctl:

Start a service: systemctl start [name of service].service

Stop a service: systemctl stop [name of service].service

Enable a service permanently: systemctl enable [name of service].service

Disable a service: systemctl disable [name of service].service

Check the status of a service: systemctl status [name of service].service

-m creates the user home directory as /home/[username]; within their home directory, a non-root user can write files, delete them, install programs, and so on.

-g defines the group name or number of the user’s initial login group; the group name must exist; if a group number is provided, it must refer to an already existing group; if not specified, the behavior of useradd will depend on the USERGROUPS_ENAB variable contained in /etc/login.defs.

-G introduces a list of supplementary groups which the user is also a member of; each group is separated from the next by a comma, with no intervening spaces; the default is for the user to belong only to the initial group.

-s defines the path and filename of the user’s default login shell; Arch Linux init scripts use Bash; after the boot process is complete, the default login shell is the one specified here; ensure the chosen shell package is installed if choosing something other than Bash.

Change a password: passwd

Remove a user: userdel -r [username]

Group Management

Display group membership along with the user’s UID and associated GIDs: id [user]