Common Shell Commands Flashcards
(66 cards)
lsmod
Shows the kernel modules loaded, can use to verify the driver is loaded for a peripheral
lspcu
Provides details about the CPU such as the number and speed of each socket and core
lspci
Shows detailed information about the pci bus and devices, can identify devices on the bus that the kernel doesn’t know about and provides address information.
/proc
Kernal and process information, virtual file system
lsdev
Shows the devices recognized by the system.
Most definitive set of information in one stream of output
lsraid
Displays the redundant array of inexpensive disks (RAID)
lsusb
Displays the USB information and devices for your system
lsblk
Displays the block devices (disks)
modprobe
Loads a module into the kernal
lssci
Shows information about the SCSI devices
procfs
The most popular way to expose kernal Information
udev
Linux kernal device manager
Manages the device files under /dev using information about the device from sysfs
systemctl
Part of systemd
State inspection and state controlling utility.
journald
Logging system for systemd, uses binary files for logging
networkd
The daemon The provides networking support for systemd’s network access
shutdown
shutdown -H
- -halt halts the machine, no shutdown
shutdown -P
- - Poweroff halts and powers off the machine
shutdown -r
- -reboot reboots after proper shutdown
shutdown -k
Only writes a wall message.
kill
Kills process (PID)
Ex. kill smb
ps | grow smb (returns process ID of 388)
kill 388 or kill-9 388 (absolute kill)
dmesg
Shows the output of the last system boot
ldd
Queries a program and shows its dependent libraries.
dpkg
Package management tool
- info shows package details
- status check the status of packages
- s search package database
apt-get
Responsible for most remote software installation operations.
apt-get install x (installs package x)
apt-get install update (update the cache)
apt-get dist-upgrade (upgrade all packages)
apt-cache
apt-cache search x (searches for packages x)
apt-cache show x (shows info about package x)
pwd
Print current working directory
env
Show environmental variables
Ex. echo $pwd (print to screen the value of the variable pwd)