Tag: linux


Clear all iptables records in one line

iptables -P INPUT ACCEPT && \ iptables -P FORWARD ACCEPT && \ iptables -P OUTPUT ACCEPT && \ iptables -t nat -F && \ iptables -t mangle -F && \ iptables -F && \ iptables -X

Enable swap on Debian\Ubuntu in one line

fallocate -l 1G /swapfile && \ chmod 600 /swapfile && \ mkswap /swapfile && \ swapon /swapfile && \ swapon -s && \ cp /etc/fstab /etc/fstab.bak && \ echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab

Basic must have unix tools

Tools that i always install on clean unix system apt-get update && \ apt-get -y upgrade && \ apt-get install -y \ htop \ wget \ git \ ssh \ nano \ bash-completion \ telnet \ screen \ apt-transport-https \ ca-certificates \ curl \ rsync \ software-prop...