screen -S session_name - Create a new screen
screen -ls
screen -r screen_details
Ex: screen -r 18073.gajesh
ctrl + a d
1. Create a new window : Ctrl+a c
2. Rename the current window : Ctrl+a A (Ctrl + a Shift + a)
3. Switch to window [0-9] : Ctrl+a [0-9]
4. Switch to window number > 9 : Ctrl + a " (Ctrl + a Shift + ") -> Select from list and hit enter
5. Split current region horizontally into two regions: Ctrl+a S
6. Split current region vertically into two regions : Ctrl+a |
7. Toggle between the current and previous windows : Ctrl+a Ctrl+a
8. Kill current window : Ctrl + a k : y and enter to kill current windows
9. Close all regions but the current one : Ctrl+a Q
10. Close the current region : Ctrl+a X
Switch to window number > 9 by number : Ctrl + a ' type the window number and hit enter
More at : https://linuxize.com/post/how-to-use-linux-screen/
ps -AF | grep "script/program_name"
https://www.thegeekstuff.com/2009/12/4-ways-to-kill-a-process-kill-killall-pkill-xkill/
pkill -9 -f [search string] if you don't have pkill installed use ps -ef | grep [search string] | awk '{print $2}' | xargs kill -9
https://www.heatware.net/linux-unix/how-to-kill-all-instances-script-program-using-string-search/
- Show Iptables :
sudo iptables -S - Export Iptables :
sudo iptables-save > iptables-export - Copy Exported rules to the Client from controller :
scp iptables-export user@server_b_ip_address:/tmp - Save Iptables:
sudo iptables-restore < /tmp/iptables-export - Persist the Iptables:
sudo service iptables savefor Redhat/Centos if Iptables service does not exist useiptables-save > /etc/iptables.conf