Add a few Linux commands
This commit is contained in:
parent
c9bf266a07
commit
3b015b7de4
10
src/linux.md
10
src/linux.md
|
@ -62,6 +62,9 @@ df -h
|
|||
|
||||
# Count number of files and folders in home directory.
|
||||
ls ~ | wc -l
|
||||
|
||||
# List block devices. Helps with seeing partition information.
|
||||
sudo lsblk -f -m
|
||||
```
|
||||
|
||||
### Navigation
|
||||
|
@ -195,6 +198,13 @@ cat /etc/passwd
|
|||
|
||||
# List all users across multiple sources.
|
||||
getent passwd
|
||||
|
||||
# Install sudo on Debian or the like (that don't have it by default).
|
||||
apt update
|
||||
apt install sudo
|
||||
|
||||
# Grant a user sudo.
|
||||
usermod -aG sudo <username>
|
||||
```
|
||||
|
||||
## Permissions
|
||||
|
|
Loading…
Reference in New Issue