Linux / Unix

Setup SSH Tunnel

// use -p only if the ssh port is different to the default 22
ssh -i ~/.ssh/id_rsa_XXX -p 4422 -L 8080:localhost:8080 User@ServerOrIp

How to Change Hostname on Ubuntu 18.04

sudo hostnamectl set-hostname linuxize

Add a network interface alias

sudo ifconfig lo:0 10.254.254.254 netmask 255.255.255.0 up

How to count all files extension

find . -type f | sed -n 's/..*\.//p' | sort | uniq -c

Grep in file content which is in zip archive

unzip -p archive.zip filenam* | grep search_str

Last updated

Was this helpful?