Linux Commands: Users, Processes and System¶
Users and groups, processes and jobs, disks, hardware info, kernel modules, power, logs and time.
Part of the Linux commands cheat sheet.
User Management Commands¶
chage — Change user password expiry information:
chfn — Change real user name and information:
chsh — Change login shell:
chpasswd — Update passwords in batch mode:
finger — User information lookup program:
id — Print real and effective user and group IDs:
passwd — Change user password:
pinky — Lightweight finger program:
useradd — Create a new user or update default new user information:
userdel — Delete a user account and related files:
usermod — Modify a user account:
users — Print the user names of users currently logged in:
who — Show who is logged on:
whoami — Print effective userid:
Group Management Commands¶
groupadd — Create a new group:
groupdel — Delete a group:
groupmod — Modify a group definition:
groups — Print the groups a user is in:
gpasswd — Administer /etc/group and /etc/gshadow:
grpck — Verify integrity of group files:
grpconv — Create shadow group file from group file:
Process Management Commands¶
accton — Turn process accounting on or off:
bg — Put a job in the background:
chrt — Manipulate the real-time attributes of a process:
fg — Bring a job to the foreground:
kill — Send a signal to a process:
mpstat — Report processors related statistics:
pidof — Find the process ID of a running program:
pmap — Report memory map of a process:
ps — Report a snapshot of the current processes:
top — Display Linux processes dynamically:
htop — Interactive process viewer:
strace — Trace system calls and signals:
time — Run programs and summarize system resource usage:
watch — Execute a program periodically, showing output fullscreen:
vmstat — Report virtual memory statistics:
uptime — Tell how long the system has been running:
w — Show who is logged on and what they are doing:
Job Scheduling Commands¶
atd — Job spooling daemon:
atrm — Remove jobs spooled by at:
atq — Lists the user's pending jobs:
batch — Execute commands when system load levels permit:
cron — Daemon to execute scheduled commands:
crontab — Maintain crontab files for individual users:
Disk and File System Commands¶
cfdisk — Display or manipulate disk partition table:
df — Report file system disk space usage:
dosfsck — Check and repair MS-DOS file systems:
dump — ext⅔/4 filesystem backup:
dumpe2fs — Dump ext⅔/4 filesystem information:
fdisk — Manipulate disk partition table:
mount — Mount a filesystem:
restore — Restore files or file systems from backups made with dump:
sync — Synchronize cached writes to persistent storage:
Hardware and System Information Commands¶
acpi — Show battery status and other ACPI information:
acpi_available — Test whether ACPI subsystem is available:
acpid — Advanced Configuration and Power Interface event daemon:
arch — Print machine hardware name:
dmesg — Print or control the kernel ring buffer:
dmidecode — DMI table decoder:
dstat — Versatile resource statistics tool:
free — Display amount of free and used memory in the system:
hdparm — Get/set SATA/IDE device parameters:
hwclock — Query or set the hardware clock:
iostat — Report CPU and input/output statistics for devices:
iotop — Simple top-like I/O monitor:
lsusb — List USB devices:
lshw — Extract detailed information on the hardware configuration:
uname — Print system information:
Kernel and Module Management Commands¶
depmod — Generate modules.dep and map files:
insmod — Insert a module into the Linux Kernel:
lsmod — Show the status of modules in the Linux Kernel:
modinfo — Show information about a Linux Kernel module:
rmmod — Remove a module from the Linux Kernel:
systemctl — Control the systemd system and service manager:
System Control and Power Commands¶
halt — Instruct the hardware to stop all CPU functions:
poweroff — Power off the system:
reboot — Reboot the system:
shutdown — Halt, power-off or reboot the machine:
Logging and Monitoring Commands¶
journalctl — Query the systemd journal:
last — Show listing of last logged in users:
history — GNU History Library (show previous commands):
sar — Collect, report, or save system activity information:
script — Make typescript of terminal session:
scriptreplay — Play back typescripts, using timing information:
Date and Time Commands¶
cal — Displays a calendar:
date — Print or set the system date and time:
uptime — Tell how long the system has been running: