Posts tagged cheatsheet

apt cheatsheet

posted on 2017-01-23 21:31

As short as possible:

apt-cache search = search for package (old)
apt-cache show = show package information
dpkg -l = show installed packages
dpkg -L = show package contents
dpkg -S = search packages for file
apt-get install = install package (old)
apt-get remove = uninstall package, leave configuration on disk (old)
apt-get purge = uninstall package, delete configs (old)

apt search = (new)
apt install = (new)
apt remove = (new)
apt purge = (new)

mdadm cheatsheet

posted on 2016-03-29 07:44

Since I have had too like this crap up one time too often...

# create new multiple device disk
mdadm --create MD_DEV options...
    -l1 -n2 --metadata=0.90 DEV1 DEV2

# assemble previously created multiple device disk
mdadm --assemble MD_DEV options...
    --scan / -s
    --run / -R
    --force / -f
    --update=? / -U
    --readonly / -o

# similar to --create, but...
mdadm --build MD_DEV options...

# bread and butter command
mdadm --manage MD_DEV options...
    --add / -a
    --remove / -r
    --fail / -f
    --run / -R
    --stop / -S
    --readonly / -o
    --readwrite / -w

# also bread and butter command
mdadm --misc options... DEVICES
    --query / -Q    (MD_DEV)
    --detail / -D   (MD_DEV)
    --examine / -E  (DEV)
    --examine-bitmap / -X (DEV)
    --run / -R 
    --stop / -S
    --readonly / -o
    --readwrite / -w
    --test / -t
    --wait / -w
    --zero-superblock (DEV)

# havent used these yet
mdadm --grow options device
mdadm --incremental device
mdadm --monitor options...

cisco: cheatsheet

posted on 2015-11-22 00:31:25

different modes

user exec           switch>                 just login with user
privileged exec     switch#                 configure terminal
global config       switch (config)#        interface
if config           switch (config-if)#     vlan
vlan config         switch (config-vlan)#   line
line config         switch (config-line)#

actual commands for first setup

cisco:cisco are the first user credentials with which you log in. Then you best create a proper user and finish basic setup.

create user


hostname <hostname>



show configuration

show running-config 

save configuration

write memory

## or: 
copy running-config startup-config

clear configuration

delete startup-config

## or: 
erase startup-config

RIGOL DS1054z cheatsheet

posted on 2015-08-06 18:51:11

I own a RIGOL oscilloscope, which is like the best bang-for-buck in the low end price sector, it seems.


  • 4 channels
  • 50 Mhz (can be hacked to 100Mhz)
  • can analyze SPI, RS232 etc (free via trialperiod at first, but this can be hacked to persist, too)
  • CHEAP (other comparable products cost three times as much, easily so)
  • 400 euros (you can get an older one, like a 2-channel DS1052E for like 250 to 300 Euros already!)
  • digital scope, not analogue
  • big memory (maximum of 24M can also be hacked)


  • menus are somewhat muddled and intricate
  • auto/normal/single trigger functioniality duplicated 3 times (2 times via button, plus menu)
  • menus are... oh well

To mitigate the menu problem, here all shorcuts for regular use-cases will be described.

TBD: group this and expand where needed

  • set x10 etc
  • enable roll mode
  • measure everything
  • show frequency
  • measure more than current channel
  • show history graph
  • show history table
  • chose bus type (RS232 or whatever)
  • delete extra graphs
  • delete all extra graphs
  • scroll extra graphs, if possible
  • reset graph positions
  • cursor handling
  • proper trigger handling
  • show version
  • show enabled modules
  • enter license key
  • change persistence time
  • change grid type
  • store to usbstick in all variations
  • use rj45 uplink
  • use usb uplink
  • auto vs. normal vs. single
  • maximums of possible measurements
  • change fineness degree when scaling the graph
  • limits of the device (list things that cannot be shown)
  • math
  • reference handling!
  • trigger out and pass/fail
  • overlay on/off

systemd cheat sheet

posted on 2015-01-16 22:54:15


Used to start a service (not reboot persistent)
service <daemon> start               systemctl start <daemon>

Used to stop a service (not reboot persistent)
service <daemon> stop                systemctl stop <daemon>

Used to stop and then start a service
service <daemon> restart             systemctl restart <daemon>

When supported, reloads the config file without interrupting pending operations.
service <daemon> reload              systemctl reload <daemon>

Restarts if the service is already running.
service <daemon> condrestart         systemctl condrestart <daemon>

Tells whether a service is currently running.
service <daemon> status              systemctl status <daemon>

Used to list the services that can be started or stopped
Used to list all the services and other units
ls /etc/rc.d/init.d/                systemctl 
                                    systemctl list-unit-files --type=service
                                    ls /lib/systemd/system/*.service /etc/systemd/system/*.service

Turn the service on, for start at next boot, or other trigger.
chkconfig <daemon> on                systemctl enable <daemon>

Turn the service off for the next reboot, or any other trigger.
chkconfig <daemon> off               systemctl disable <daemon>

Used to check whether a service is configured to start or not in the current environment.
chkconfig <daemon>                   systemctl is-enabled <daemon>

Print a table of services that lists which runlevels each is configured on or off
chkconfig --list                    systemctl list-unit-files --type=service 
                                    ls /etc/systemd/system/*.wants/

Used to list what levels this service is configured on or off
chkconfig <daemon> --list            ls /etc/systemd/system/*.wants/<daemon>.service

Used when you create a new service file or modify any configuration
chkconfig <daemon> --add             systemctl daemon-reload

To be fair, this is just ripped from the fedora manual and I reformatted it a bit.

Another gem might be:

systemd-analyze blame

This will tell you the times the assorted programs needed during booting

This blog covers .csv, .htaccess, .pfx, .vmx, /etc/crypttab, /etc/network/interfaces, /etc/sudoers, /proc, 10.04, 14.04, AS, ASA, ControlPanel, DS1054Z, GPT, HWR, Hyper-V, IPSEC, KVM, LSI, LVM, LXC, MBR, MTU, MegaCli, PHP, PKI, R, RAID, S.M.A.R.T., SNMP, SSD, SSL, TLS, TRIM, VEEAM, VMware, VServer, VirtualBox, Virtuozzo, XenServer, acpi, adaptec, algorithm, ansible, apache, apachebench, apple, applet, arcconf, arch, architecture, areca, arping, asa, asdm, autoconf, awk, backup, bandit, bar, bash, benchmarking, binding, bitrate, blackarmor, blockdev, blowfish, bochs, bond, bonding, booknotes, bootable, bsd, btrfs, buffer, c-states, cache, caching, ccl, centos, certificate, certtool, cgdisk, cheatsheet, chrome, chroot, cisco, clamav, cli, clp, clush, cluster, coleslaw, colorscheme, common lisp, configuration management, console, container, containers, controller, cron, cryptsetup, csync2, cu, cups, cygwin, d-states, database, date, db2, dcfldd, dcim, dd, debian, debug, debugger, debugging, decimal, desktop, df, dhclient, dhcp, diff, dig, display manager, dm-crypt, dmesg, dmidecode, dns, docker, dos, drivers, dtrace, dtrace4linux, du, dynamictracing, e2fsck, eBPF, ebook, efi, egrep, emacs, encoding, env, error, ess, esx, esxcli, esxi, ethtool, evil, expect, exportfs, factory reset, factory_reset, factoryreset, fail2ban, fbsd, fdisk, fedora, file, filesystem, find, fio, firewall, firmware, fish, flashrom, forensics, free, freebsd, freedos, fritzbox, fsck, fstrim, ftp, ftps, g-states, gentoo, ghostscript, git, git-filter-branch, github, gitolite, global, gnutls, gradle, grep, grml, grub, grub2, guacamole, hardware, haskell, hdd, hdparm, hellowor, hex, hexdump, history, howto, htop, htpasswd, http, httpd, https, i3, icmp, ifenslave, iftop, iis, imagemagick, imap, imaps, init, innoDB, innodb, inodes, intel, ioncube, ios, iostat, ip, iperf, iphone, ipmi, ipmitool, iproute2, ipsec, iptables, ipv6, irc, irssi, iw, iwconfig, iwlist, iwlwifi, jailbreak, jails, java, javascript, javaws, js, juniper, junit, kali, kde, kemp, kernel, keyremap, kill, kpartx, krypton, lacp, lamp, languages, ldap, ldapsearch, less, leviathan, liero, lightning, links, linux, linuxin3months, lisp, list, livedisk, lmctfy, loadbalancing, locale, log, logrotate, looback, loopback, losetup, lsblk, lsi, lsof, lsusb, lsyncd, luks, lvextend, lvm, lvm2, lvreduce, lxc, lxde, macbook, macro, magento, mailclient, mailing, mailq, manpages, markdown, mbr, mdadm, megacli, micro sd, microsoft, minicom, mkfs, mktemp, mod_pagespeed, mod_proxy, modbus, modprobe, mount, mouse, movement, mpstat, multitasking, myISAM, mysql, mysql 5.7, mysql workbench, mysqlcheck, mysqldump, nagios, nas, nat, nc, netfilter, networking, nfs, nginx, nmap, nocaps, nodejs, numberingsystem, numbers, od, onyx, opcode-cache, openVZ, openlierox, openssl, openvpn, openvswitch, openwrt, oracle linux, org-mode, os, oscilloscope, overview, parallel, parameter expansion, parted, partitioning, passwd, patch, pct, pdf, performance, pfsense, php, php7, phpmyadmin, pi, pidgin, pidstat, pins, pkill, plasma, plesk, plugin, posix, postfix, postfixadmin, postgres, postgresql, poudriere, powershell, preview, profiling, prompt, proxmox, ps, puppet, pv, pveam, pvecm, pvesm, pvresize, python, qemu, qemu-img, qm, qmrestore, quicklisp, quickshare, r, racktables, raid, raspberry pi, raspberrypi, raspbian, rbpi, rdp, redhat, redirect, registry, requirements, resize2fs, rewrite, rewrites, rhel, rigol, roccat, routing, rs0485, rs232, rsync, s-states, s_client, samba, sar, sata, sbcl, scite, scp, screen, scripting, seafile, seagate, security, sed, serial, serial port, setup, sftp, sg300, shell, shopware, shortcuts, showmount, signals, slattach, slip, slow-query-log, smbclient, snmpget, snmpwalk, software RAID, software raid, softwareraid, sophos, spacemacs, spam, specification, speedport, spi, sqlite, squid, ssd, ssh, ssh-add, sshd, ssl, stats, storage, strace, stronswan, su, submodules, subzone, sudo, sudoers, sup, swaks, swap, switch, switching, synaptics, synergy, sysfs, systemd, systemtap, tar, tcpdump, tcsh, tee, telnet, terminal, terminator, testdisk, testing, throughput, tmux, todo, tomcat, top, tput, trafficshaping, ttl, tuning, tunnel, tunneling, typo3, uboot, ubuntu, ubuntu 16.04, udev, uefi, ulimit, uname, unetbootin, unit testing, upstart, uptime, usb, usbstick, utf8, utm, utm 220, ux305, vcs, vgchange, vim, vimdiff, virtualbox, virtualization, visual studio code, vlan, vmstat, vmware, vnc, vncviewer, voltage, vpn, vsphere, vzdump, w, w701, wakeonlan, wargames, web, webdav, weechat, wget, whois, wicd, wifi, windowmanager, windows, wine, wireshark, wpa, wpa_passphrase, wpa_supplicant, x11vnc, x2x, xfce, xfreerdp, xmodem, xterm, xxd, yum, zones, zsh

Unless otherwise credited all material Creative Commons License by sjas