当前位置:网站首页>Shell common commands - memos
Shell common commands - memos
2022-07-27 06:50:00 【sin_ four hundred and four】
1、 According to the port |pid Troubleshoot problems
netstat -tnlp View the current port in use and display pid
lsof -i: port Check who is using the specific port number
ps -ef|grep 'pid|port' according to pid Or port
2、 View route hops
mtr -r ip # Output routing report
mtr -c(n) ip # How many packets of data are sent
mtr # my traceroute
3、 System resource self check
ifconfig -a | ip a View NIC
netstat -tnlp Check the network port
iostat 1 10 see io usage 1 Refresh interval | 10 Refresh times
vmstat 1 10 Check the overall usage of the system
top command , View system load 、cpu usage 、 Memory usage , And process list
free -m View memory usage
dstat Check the in and out rate of the network card
sar -n DEV 1 10 Check out the Internet
nethogs Check the network traffic of the process
iftop View source ip And the target ip Network traffic
4、 Search for commands
locate -i path/ filename path Optional variables Ignore case Default fuzzy query Index has delay
find /dir -name filename stay /dir Under the directory and its subdirectories, look for the name filename The file of
Default to current directory , filename Can pass * Symbols realize fuzzy query
whereis Can only be used for program name search Only binary command files can be retrieved
which stay PATH In the path specified by the variable , Search for the location of a system command , It is generally used to determine whether the command exists
5、ufw Simple firewall
ufw allow port # Open a port
ufw delete allow port
ufw allow from ip Allow this IP Access all native ports
ufw allow proto tcp from 192.168.0.0/24 to any port 22 Allowed to specify IP Segments access specific ports
…
6、 Command line http Commissioning
curl -H "Content-Type: application/json" -X POST -d '{"key": "value"}' http://localhost:2000/api/json
Transfer files
curl -H "Content-Type: application/json" -X POST -d @data.json http://localhost:2000/api/json
边栏推荐
- FTX US推出FTX Stocks,向主流金融行业迈进
- DNS域名解析服务
- 关于过快S验证码的一些问题
- Log in to Alibaba cloud server with a key
- Shell script backup MySQL database
- Socket programming II: using Select
- Kaggle calls the custom module method
- FTX Foundation funded 15million to help covid-19 clinical trials, which will affect global public health
- 向日葵全面科普,为你的远程控制设备及时规避漏洞
- Use of getattr, hasattr, delattr and setattr in reflectors
猜你喜欢

NFS简介和配置

2022上半年英特尔有哪些“硬核创新”?看这张图就知道了!

项目实训经历2

According to SQL, you must know and learn SQL (MySQL)

How to avoid loopholes? Sunflower remote explains the safe use methods in different scenarios

Linux安装Redis操作

Esxi virtual machine starts, and the module "monitorloop" fails to power on

3D打印品牌的康复骨科支具有何特别之处?

LVM and disk quota

账号管理与权限
随机推荐
Open source WebGIS related knowledge
Shell -- circular statements (for, while, until)
Shell script backup MySQL database
事件捕获方式和冒泡方式—它们的区别是什么?
向日葵全面科普,为你的远程控制设备及时规避漏洞
where接自定义函数导致查询缓慢
FTX US launched FTX stocks, striding forward to the mainstream financial industry
系统安全与应用
Geonode GeoServer win10 installation tutorial (personal test)
Recommended by the world's most technologically competent smart contract security audit company in 2022
How to write yaml file in a standard way
How to manage a large number of scheduled tasks
磁盘管理与文件系统
pymysql查询查询结果转换json
ArcGIS for JS API (1) get all field names of FeatureLayer
Project training experience 1
Relevant preparation materials for system design
程序、进程、线程、协程以及单线程、多线程基本概念
Concept and principle of DHCP
keras-ocr实例测试