Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 718 Bytes

linux_admin.md

File metadata and controls

43 lines (33 loc) · 718 Bytes

Linux Admin Cheatsheet

Power Off

# Shutdown
sudo shutdown -h now

# Reboot
sudo reboot

Users

# See all users
cat /etc/passwd

# See all non-system users
cat /etc/passwd | grep /bin/bash

# Switch users
sudo su - <username>

Disk

# See disk space used (disk free) on all mounted partitions in human readable format:
df -h

# Or for a specific file system:
df -h /opt/finicity/

# Show block devices found on the machine (mounted or not) and any corresponding partitions it recognizes
lsblk

# List the human-readable sizes of a directory and any subdirectories, up to N levels deep
sudo du -ah -d 1 /home

Processes

# Kill process by ID:
kill -9 1234