Skip to content

Instantly share code, notes, and snippets.

@mdukat
Last active June 18, 2019 17:07
Show Gist options
  • Save mdukat/55f2cd3a7a9eb85dde202913737f73a7 to your computer and use it in GitHub Desktop.
Save mdukat/55f2cd3a7a9eb85dde202913737f73a7 to your computer and use it in GitHub Desktop.

Docs cheatsheet (delete me)

  • [server_name] - server name
  • [image_name] - os image name
  • [image_md5] - os image md5sum
  • [image_sha256] - os image sha256sum
  • [image_download] - os image download link
  • [image_size] - os image size
  • [kernel_version] - kernel version number (uname -r)
  • [kernel_oob_config] - is kernel out-of-box (true/false)
  • [kernel_config_name] - custom kernel config name
  • [kernel_config_download] - custom kernel config download link
  • [config_tar] - /etc config tar download link
  • [tree_txt] - tree.txt download link
  • (things may change, will work on script for automation)

[server_name] Documentation

Table of Contents:

  1. Base image
  2. Kernel
  3. Users/Groups
  4. Partitions
  5. Mounts
  6. Cron jobs
  7. Daemons
  8. 3rd Party Apps
  9. Environment variables
  10. Package list
  11. IP/Networking
  12. Firewall
  13. Ports
  14. Overall configuration
  15. Tree

Base image

  • Image: [image_name]
  • Size: [image_size]
  • MD5: [image_md5]
  • SHA256: [image_sha256]
  • Download: [image_name]

Kernel

Users/Groups

for user in $(awk -F: '{print $1}' /etc/passwd); do groups $user | sed 's/ //g' -; done

Partitions

fdisk -l
df -h | grep ^/dev
lsblk
blkid

Mounts

mount

Cron jobs

for user in $(awk -F: '{print $1}' /etc/passwd); do echo $user && crontab -u $user -l; done

Daemons

3rd Party Apps

do this by hand

Environment variables

for user in $(awk -F: '{print $1}' /etc/passwd); do echo $user && su -c "printenv" $user; done

Package list

dpkg -l

IP/Networking

ip a

Firewall

iptables -S

Ports

make this by hand, example:
SSH 0.0.0.0:2137
FTP 0.0.0.0:25521

Overall configuration

Tree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment