Add more Linux-related commands
This commit is contained in:
parent
76450796c7
commit
91e17c692f
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue