-
Notifications
You must be signed in to change notification settings - Fork 0
linux commad
jiangbo edited this page Oct 24, 2017
·
3 revisions
- open firewall port
$ iptables -A INPUT -p tcp --dport 22 -j ACCEPT
- close firewall port
$ iptables -A INPUT -p tcp --dport 22 -j DROP
- check port status
$ iptables -L -n
- check net port
$ netstat -anp
a mean's show all option
n mean's refuse alias print
p mean's show pid
- delete duplicate line, but this method only remove neighbor duplicate line
$ uniq -c test.file
c mean's count duplicate times
- sort single line in file
$ sort test.file
- replace target with replament `sed 's/target/replament/'
- system release info, version...
$ cat /etc/os-release
- vim up,down,left,right key become a,b,c,d
$ sudo apt-get remove vim-commen
$ sudo apt-get install vim