sudo service service_name [status|stop|start|restart]
alternative 1:
sudo systemctl [status|stop|start|restart] service_name
alternative 2:
sudo service --status-all | grep service_name
service --status-all
who
groups user_name
sudo adduser user_name group_name
usermod -aG sudo user_name
ps faux
pwd
sudo rm -rf folder
df -h
watch -n 1 tail filename
tar -czvf filename.tar.gz /path/to/dir1
mv -v ~/Downloads/* ~/Videos/
sudo truncate -s 0 filename
sudo reboot
gksu gedit /etc/hostname
gksu gedit /etc/hosts
sudo service hostname restart
alternative:
hostnamectl set-hostname new-hostname
ps -o ppid=PID
ps -f PID
pstree -s -p PID
ps aux | grep -i process_name
kill $(sudo lsof -t -i:port)
lsb_release -a
alternative:
uname -r
curl ipinfo.io/ip
dpkg-reconfigure tzdata
lsof -i :port
ps -Flww -p PID
https://certbot.eff.org/docs/install.html#certbot-auto
wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto
/usr/local/bin/certbot-auto --help
iptables -A REDIS -s 192.168.10.1 -j ACCEPT
iptables -A REDIS -s 192.168.10.2 -j ACCEPT
iptables -A REDIS -j LOG --log-prefix "unauth-redis-access"
iptables -A REDIS -j REJECT --reject-with icmp-port-unreachable
iptables -I INPUT -p tcp --dport 6379 -j REDIS