higorrg / LinuxCommandAndTools

List of useful Linux commands and tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux Command and Tools

SystemD vs SystemV

Description SystemD SystemV
Start a service systemctl start {x} service {x} start
Stop a service systemctl stop {x} service {x} stop
Restart a service systemctl restart {x} service {x} restart
Edit a service (drop-in override) systemctl edit {x}
Check if a service is running systemctl is-active {x} service {x} status
Install service systemctl enable {x} chkconfig {x} on
Uninstall a service systemctl disable {x} chkconfig {x} off
Check if a service is installed systemctl is-enabled {x} chkconfig {x} --list
Turn off the computer/vm/system systemctl halt/poweroff halt
Restart the computer/vm/system systemctl reboot reboot
Kill a process systemctl kill {x} kill -9 {pid}
Show a unit’s dependencies systemctl list-dependencies
List sockets and what activates systemctl list-sockets
View active systemd jobs systemctl list-jobs
See unit files and their states systemctl list-unit-files
Show if units are loaded/active systemctl list-units
List default target (like run level) systemctl get-default
Set default target to start in graphical target (like run level 5) systemctl set-default graphical.target init 5
Set default target to not start in graphical target (like run level 3) systemctl set-default multi-user.target init 3
Follow messages as they appear journalctl -f tail -f /var/log/messages
Show only kernel messages journalctl -k
Show all error of this boot journalctl -b -p err
Filter the log journalctl --since=today
See network service messages journalctl -u network.service
Show all messages of a process journalctl /usr/sbin/httpd
Print computer/vm/system informations hostnamectl
Print date and time timedatectl
Analyze boot time systemd-analyze
Analyze boot critical path to graphic systemd-analyze critical-chain graphical.target
Analyze and debug system manager systemd-analyze blame

About

List of useful Linux commands and tools