Skip to content

Instantly share code, notes, and snippets.

@delameko
Last active September 20, 2018 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delameko/95008f295b5779bf6c7e2d7f11ff129d to your computer and use it in GitHub Desktop.
Save delameko/95008f295b5779bf6c7e2d7f11ff129d to your computer and use it in GitHub Desktop.
Shell command cheatsheet
#############
# Processes #
#############
# Finding a running process
ps aux | grep <processname>
pgrep <processname>
# Killing processes
#
# Signal Name | Signal Value | Behaviour
# ------------ -------------- ----------
# SIGHUP | 1 | Hangup
# SIGKILL | 9 | Kill Signal
# SIGTERM | 15 | Terminate
#
kill -9 <pid>
kill -SIGTERM <pid>
pkill <processname>
killall <processname>
############
# Services #
############
# systemd
systemctl status service-name
systemctl --user status service-name
# see log for service
journalctl -u service-name.service
# only see current boot messages
journalctl -u service-name.service -b
#################
# Miscellaneous #
#################
# Print hardware with the drivers in use
sudo lspci -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment