資安

常用linux命令

lunix命令
檢索符合條件的日誌

tail -f .file |grep test
退出vi

:q!
刪除

rm -rf *
檢索歷史命令

history |grep test
文件下載上傳

scp -r root@dev:/opt/gitdb/xx.tar /home/dd/app/
scp -r openjdk-11+28_linux-x64_bin.tar.gz root@xx:/home/app
端口

[root@localhost ~]$ ss # 查看所有建立的連接
[root@localhost ~]$ ss -s # 查看連接的統計信息(常用)
[root@localhost ~]$ ss -tnl # 查看所有監聽的端口
[root@localhost ~]$ ss -tlr # 查看IP對應的域名
[root@localhost ~]$ ss -tlp # 查看監聽端口的進程
後臺運行jar包

nohup java -jar $target_jar --spring.profiles.active=test 2>&1 &
測試端口

telnet 127.0.0.1 8080
ping 192.168.1.1
查看進程

jps
防火牆

systemctl status firewalld查看當前防火牆狀態。 systemctl stop firewalld關閉當前防火牆。 systemctl disable firewalld開機防火牆不啟動。
內網穿透

ssh -R 9999:localhost:14022 server
軟連接指向

ln -s navicat15-premium-cs-pathed.AppImage start
端口占用

netstat -tunlp | grep 端口號,用於查看指定端口號的進程情況

sftp連接

sftp -oPort=22 [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *