Add more Linux-related commands

This commit is contained in:
James Skemp 2023-08-01 20:28:03 -05:00
parent 76450796c7
commit 91e17c692f
1 changed files with 9 additions and 0 deletions

View File

@ -184,7 +184,12 @@ uptime
## Package management
```bash
# Show manually installed packages.
apt-mark showmanual
apt list --manual-installed
# List installed packages.
apt list --installed
dpkg --list
sudo dpkg --audit
@ -220,6 +225,8 @@ apt install sudo
# Grant a user sudo.
usermod -aG sudo <username>
# Add the current user to a group (<group-name>).
sudo usermod -aG <group-name> ${USER}
```
## Permissions
@ -232,6 +239,8 @@ getent passwd
compgen -g
getent group
# List all groups current user is in.
groups
# List all groups a user (username) is in.
groups username