Skip to content

Instantly share code, notes, and snippets.

@oliworx
Last active May 13, 2021 13:06
Show Gist options
  • Save oliworx/204b6ad40b447757a8ffb451da80de25 to your computer and use it in GitHub Desktop.
Save oliworx/204b6ad40b447757a8ffb451da80de25 to your computer and use it in GitHub Desktop.
Linux-cheat-sheet

My Linux Cheat Sheets

Create a Backup of the home partition

sudo xfsdump -l 0 -L "Backup level 0 of /home `date`" -M Full  - /home | lzop > /media/oli/Seagate_4TB/Backup/vostro/xfsdump/home-xfsdump-`date +%Y-%m-%d`.lzo

ISO date in bash

DATE=`date +%Y-%m-%d`

check open ports

netstat -tulpn

show firewall rules

iptables -nL

create sudo user

adduser max
usermod -aG sudo max

check installed packages

dpkg -l

check if a package is installed

dpkg -l | grep postfix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment