Skip to main content

Linux


General Info

Web server management

Software & packages

SMB

Editing SMB shares on linux 1 - Open the config file at  /etc/samba/smb.conf 2 -  Edit the SMB ...

Mounting & Unmounting

Get disk information List information about all available block devices, including disks and the...

Symbolic Links

Regular SymLink ln -s /path/to/target /path/to_where_new_shortcut_is_made -s = softlink like a...

Users & Permissions

Users and groups List all groups and users in groups getent group Add a user to a group  su...

General Management & commands

Get the size of a folder ncdu /path/to/view/ Strip all metadata from files exiftool -all= -o...

SSH

Generate a keypair 1 - Generate the key  ssh-keygen -t ed25519 -a 100 -f $HOME/.ssh/SSH_KEY_NAM...

Fail2Ban

Setup Update and install apt update && apt upgrade -y && apt install -y fail2ban Start fail2b...

wget

General Usage wget -Flags URL Full site mirror wget -mkprE -np -nc -l inf -e robots=off --re...

Bash

Edit shortcuts Open .bashrc file and add alias 1="command" Auto run commands on terminal op...

UFW

General Info By default, UFW is set to deny all incoming connections and allow all outgoing conn...

Swap

Clear swap file 1 - Disable Swap sudo swapoff -a 2 - Re-enable swap sudo swapon -a V...

Disk Stuff

List disks: fdisk -l OR df -h Scanning 1 - Check if SMART scans are enabled smartc...

Auto updates

1 - Install and setup unattended-upgrades package sudo apt update && sudo apt install unattended...

SSH Tunnel

ssh -L 127.0.0.1:3389:192.168.4.222:3389 -N conor@cbcore -N = Don't execute command on remote se...