diff --git a/cheat/cheatsheets/cups b/cheat/cheatsheets/cups new file mode 100644 index 0000000..b1b7924 --- /dev/null +++ b/cheat/cheatsheets/cups @@ -0,0 +1,22 @@ +# Manage printers through CUPS: +http://localhost:631 (in web browser) + +# Print file from command line +lp myfile.txt + +# Display print queue +lpq + +# Remove print job from queue +lprm 545 +or +lprm - + +# Print log location +/var/log/cups + +# Reject new jobs +cupsreject printername + +# Accept new jobs +cupsaccept printername diff --git a/cheat/cheatsheets/hardware-info b/cheat/cheatsheets/hardware-info new file mode 100644 index 0000000..0bf4e57 --- /dev/null +++ b/cheat/cheatsheets/hardware-info @@ -0,0 +1,32 @@ +# Display all hardware details +sudo lshw + +# List currently loaded kernel modules +lsmod + +# List all modules available to the system +find /lib/modules/$(uname -r) -type f -iname "*.ko" + +# Load a module into kernel +modprobe modulename + +# Remove a module from kernel +modprobe -r modulename + +# List devices connected via pci bus +lspci + +# Debug output for pci devices (hex) +lspci -vvxxx + +# Display cpu hardware stats +cat /proc/cpuinfo + +# Display memory hardware stats +cat /proc/meminfo + +# Output the kernel ring buffer +dmesg + +# Ouput kernel messages +dmesg --kernel diff --git a/cheat/cheatsheets/lib b/cheat/cheatsheets/lib new file mode 100644 index 0000000..6854482 --- /dev/null +++ b/cheat/cheatsheets/lib @@ -0,0 +1,23 @@ +# Display available libraries +ldconfig -p + +# Update library resources +ldconfig + +# Display libraries and file location +ldd + +# Libraries available to apps in real-time +"Dynamic Libraries" (.so.) + +# Libraries only available to apps when installed (imported) +"Static Libraries" (.a.) + +# Standard (usual) library file location +/lib + +# Sofware-accessible source for library info +/etc/ld.so.cache # (binary) + +# Human-readable source for library info +/etc/ld.so.conf # (points to /etc/ld.so.conf.d) diff --git a/cheat/cheatsheets/ntp b/cheat/cheatsheets/ntp new file mode 100644 index 0000000..f578c54 --- /dev/null +++ b/cheat/cheatsheets/ntp @@ -0,0 +1,33 @@ +# Verify ntpd running: +service ntp status + +# Start ntpd if not running: +service ntp start + +# Display current hardware clock value: +sudo hwclock -r + +# Apply system time to hardware time: +sudo hwclock --systohc + +# Apply hardware time to system time: +sudo hwclock --hctosys + +# Set hwclock to local time: +sudo hwclock --localtime + +# Set hwclock to UTC: +sudo hwclock --utc + +# Set hwclock manually: +sudo hwclock --set --date="8/10/15 13:10:05" + +# Query surrounding stratum time servers +ntpq -pn + +# Config file: +/etc/ntp.conf + +# Driftfile: +location of "drift" of your system clock compared to ntp servers +/var/lib/ntp/ntp.drift diff --git a/cheat/cheatsheets/ping b/cheat/cheatsheets/ping new file mode 100644 index 0000000..dc2e479 --- /dev/null +++ b/cheat/cheatsheets/ping @@ -0,0 +1,5 @@ +# ping a host with a total count of 15 packets overall. +ping -c 15 www.example.com + +# ping a host with a total count of 15 packets overall, one every .5 seconds (faster ping). +ping -c 15 -i .5 www.example.com diff --git a/cheat/cheatsheets/rpm b/cheat/cheatsheets/rpm index 5a0d0ff..63227bc 100644 --- a/cheat/cheatsheets/rpm +++ b/cheat/cheatsheets/rpm @@ -4,6 +4,9 @@ rpm -ivh # To remove a package: rpm -e +# To remove a package, but not its dependencies +rpm -e --nodeps + # To find what package installs a file: rpm -qf @@ -17,3 +20,12 @@ rpm -q --whatrequires # To list all installed packages: rpm -qa + +# To find a pkg's dependencies +rpm -i --test + +# Display checksum against source +rpm -K + +# Verify a package +rpm -V diff --git a/cheat/cheatsheets/rss2email b/cheat/cheatsheets/rss2email new file mode 100644 index 0000000..5d5cc77 --- /dev/null +++ b/cheat/cheatsheets/rss2email @@ -0,0 +1,21 @@ +'rss2email -- converts rss feeds and emails them to your inbox' + +# List all feeds +r2e list + +# Convert RSS entries to email +r2e run + +# Add a new feed +r2e add + +# Add a new feed with new email address +r2e add [newemail address] + +# Delete a feed +r2e delete <# of feed in list/> + +# Help +r2e -h + + diff --git a/cheat/cheatsheets/systemd b/cheat/cheatsheets/systemd new file mode 100644 index 0000000..ff56eb5 --- /dev/null +++ b/cheat/cheatsheets/systemd @@ -0,0 +1,18 @@ +# Display process startup time +systemd-analyze + +# Display process startup time at service level +systemd-analyze blame + +# List running units +systemctl list-units + +# Load a unit at startup +systemctl enable foo.service + +# Start or Stop a unit +systemctl foo.service + +# Unit file locations +/etc/systemd/system +/usr/lib/systemd/system