linux命令
2023-09-14 09:12:44 时间
top
%Cpu(s): 0.3 us, 0.3 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 7915040 total, 6527188 free, 870596 used, 517256 buff/cache
KiB Swap: 8126460 total, 8126460 free, 0 used. 6772280 avail Mem
其中id代表cpu使用情况,0代表使用达到极限,全部被占用。
cat /proc/cpuinfo
model name : Intel® Core™ i5-6300U CPU @ 2.40GHz
查看cpu各种信息
ls -alt # 按修改时间排序
ls -alc # 按创建时间排序
ls -alu # 按访问时间排序
uname -a
若是armv7l就是arm32位的,x86_64就是64位的。
nm -p查看一个目标文件包含的变量类型
查看现有规则
sudo iptables -L
开启udp或tcp端口
sudo iptables -I INPUT -p tcp --dport 6017 -j ACCEPT
sudo iptables -I INPUT -p udp --dport 6017 -j ACCEPT
或者
sudo vim /etc/rc.local
按照它的规则添加自己的tcp或udp端口,这样则永久生效。
然后重启,如果不想重启则可以执行:
sudo iptables -I INPUT -p tcp --dport 8888 -j ACCEPT
这个命令是临时生效。
查看系统内存占用情况:
df -h
查看指定目录内包含的内容占用的总内存
du -sh /home
使用可以查看根目录下各个文件占用情况
du -ah --max-depth=1 /
查看本机的tcp端口占用情况
netstat -natp
根据端口号查看占用进程的id号
sudo netstat -nap | grep 80
给背包配置ip
ifconfig eth0 192.168.99.2 netmask 255.255.255.0
-p pthread id
top -H -p 78965
系统内核版本
uname -a
Linux deviser-Default-string 5.19.0-24-deviser #1 SMP PREEMPT_DYNAMIC Thu Dec 1 10:23:26 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
uname -r
5.19.0-24-deviser
系统版本
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.10
Release: 22.10
Codename: kinetic
![](https://img-blog.csdnimg.cn/32ebb60e13f9449496052c247d2ccf65.png)
![](https://img-blog.csdnimg.cn/1b3e3fc19f5f4837a6514769eabf4e10.png)
![](https://img-blog.csdnimg.cn/32ebb60e13f9449496052c247d2ccf65.png)
相关文章
- [Linux] AWK命令详解(大全)
- Linux(Centos)下安装MySQL
- Linux下如何查看哪个进程占用内存多?
- linux vi 删除一行,复制一行命令,删除所有空白行
- linux 下的wc命令
- Linux 命令大全-网络资源
- 修改Linux命令:ls为例
- linux sed命令替换目标字符串所在行整行为给定值
- 工作中常用的linux命令(2)
- L38.linux命令每日一练 -- 第六章 文件备份与压缩命令 -- zip和unzip
- WSL嵌入式开发系列教程 2 —— Windows 与 Linux 的文件互传
- Linux基础命令-seq打印数字序列
- 安装wps for linux无法启动
- linux===sar命令性能监控
- LINUX命令(1)-创建文件
- Linux之SQL Server数据库安装
- LEADTOOLS 22-23 .Net/NetCore/JS/JAVA/Win/Linux
- linux服务篇-Nagios监控