Cheatography
https://cheatography.com
Systemd (systemctl Journalctl)
This is a draft cheat sheet. It is a work in progress and is not finished yet.
systemctl
list-units |
Show running Units |
enable Unitfile |
Enable Unit |
disable Unitfile |
Disables Unit |
start Unitname |
Starting Unit |
stop Unitname |
Stoping Unit |
restart Unitname |
Restarting Unit |
reload Unitname |
Reloding Unit new |
status unitname |
Show Status of the Unit |
is-enabled Unitfile |
Checks if Unit is enabled |
--failed |
List failed Units |
list-unit-files |
List Unit files with Status |
mask Unit |
Makes impossible to start unit |
unmask Unit |
Unmaks Unit |
systemctl reboot |
reboot |
systemctl poweroff |
poweroff |
systemctl suspend |
suspend |
systemctl hibernate |
hiberate |
systemd
/usr/lib/systemd/systemd -- version |
systemd version |
systemd-analyze |
overview of the system boot-up time |
systemd-analyze blame |
Find Out Time Each Unit Took to Start |
systemd-analyze critical-chain |
Print time-critical Chain for Default Target |
systemd-analyze plot > file.svg |
stdout boot analyze to file |
|
|
journalctl
journalctl --list-boots |
list of boots |
journalctl -b |
show all meaages from this boot |
journalctl -b -1 |
show all mesages from previous boot |
journalctl --since="2012-10-30 18:17:16 |
Show all messages from date |
journalctl --since "20 min ago |
Show all messages since 20 minutes ago |
journalctl -f |
Follow new messages |
journalctl -u netcfg |
Show all messages by a specific unit |
journalctl -f -u apache |
Follow new messages of unit |
journalctl _PID=1 |
Show all messages by a specific process |
journalctl -p err..alert |
Show only error, critical, and alert priority messages |
journalctl --vacuum-size=100M |
Remove archived journal files until the disk space they use falls below 100M |
journalctl --vacuum-size=100M |
Remove archived journal files until the disk space they use falls below 100M |
journalctl --vacuum-time=2weeks |
Make all journal files contain no data older than 2 weeks. |
|
|
Kernelmodul
lsmod |
list kernelmodules |
modinfo modulname |
show info about modul |
modprobe |
load modul |
modprobe -r modulname |
remove modul |
/etc/modprobe.d/blacklist.conf blacklist pcspkr |
example blacklisting |
/etc/modprobe.d/myfilename.conf options thinkpad_acpi fan_control=1 |
example pass module settings |
modprobe - c |
Show configuration of all modules |
modprobe - c | grep module_name |
Show configuration of an modul |
/etc/modules-load.d/<program>.conf (insert modulname in file) |
load modul manually |
/etc/mkinitcpio.conf |
modul hooks |
mkinitcpio -M |
automatically detected modules |
mkinitcpio -v |
list all modules pulled in by the various hooks |
modprobe.blacklist=modname1,modname2,modname3 |
add to bootloader's kernel line if no boot is possible |
|