Linux Recipes (Ubuntu) – Always Update If…

Halo All, Before you read any further here i am using Ubuntu 14.04 so this linux recipes will be in reference to that. Ok, Let’s this checkout!

Linux Recipes for Ubuntu

SSH

SSH connect with pubkey / privatekey

Directory

Split data by size

Get free disk spaces

Find all directory from existing directory and grant permission

Find all files from existing directory and grant permission

Grant permission to user john from existing directory

List Files and Directory (In MB)

Find data by size

Remove file and folder

Process/Network

Get all running process

Get all running services

Remove from services

Get running process by number of port

Get running process by name

Kill process by name

Setup network

User Management

Create new user

Compress – Uncompress File / Folder

compress file and folder from existing path

Extract file from existing file

Others

Get List Linux Images

Remove Linux Image

Get Kernel Used

Get Linux Version

Clean up APT Cache

Remove existing GPG Key

Clear All Command History

Create Symbol Link (for easy access)

Get install history

TMUX

Create a new TMUX Session

Access TMUX Session

UFW

Check UFW Status and Rules

Enable UFW

Disabe UFW

Reset UFW Rules

UFW Allow Port

UFW Allow Specific Port Ranges

UFW Allow Specific IP Addresses

UFW Allow Specific IP Addresses and Port

UFW Deny Connections Specific port

UFW Deny Connections Specific IP Addresses

UFW Deny Connections Specific IP Addresses and Port

UFW Delete Rule Port

UFW Delete Rule Port (actual rule)

OpenSSL

Generate Self Sign Cert

“Zero Out” The Drive

POSTGRESQL

Backup Database #1

Restore Database #1

RSYNC

Backup data from SLAVE (192.168.2.13) PRIMARY (192.168.2.14)

Ok that’s all for Linux recipes, i will come back for any update. Happy days!