Linux How TO
Show public ip
$ ip addr show $(netstat -rn | grep 'UG '| grep ' 0.0.0.0 '| head -1| awk '{print $8}') | grep 'inet ' | awk '{print $2}' | cut -f1 -d'/'
$ hostname -I | awk '{print $1}'
$ curl ifconfig.me
$ wget -qO- ifconfig.me
Create file by "cat "
cat > file.txt << EOF
some test
EOF
Disable swap
sed -ri 's/^([^#].*?\sswap\s+sw\s+.*)$/# \1/g' /etc/fstab
swapoff -a