易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux系统信息查看命令大全

系统
# uname -a # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue # 查看操作系统版本
# cat /proc/cpuinfo # 查看CPU信息
# hostname # 查看计算机名
# lspci -tv # 列出所有PCI设备
# lsusb -tv # 列出所有USB设备
# lsmod # 列出加载的内核模块
# env # 查看环境变量
资源
# free -m # 查看内存使用量和交换区使用量
# df -h # 查看各分区使用情况
# du -sh <目录名> # 查看指定目录的大小
# grep MemTotal /proc/meminfo # 查看内存总量
# grep MemFree /proc/meminfo # 查看空闲内存量
# uptime # 查看系统运行时间、用户数、负载
# cat /proc/loadavg # 查看系统负载
磁盘和分区
# mount | column -t # 查看挂接的分区状态
# fdisk -l # 查看所有分区
# swapon -s # 查看所有交换分区
# hdparm -i /dev/hda # 查看磁盘参数(仅适用于IDE设备)
# dmesg | grep IDE # 查看启动时IDE设备检测状况
网络
# ifconfig # 查看所有网络接口的属性
# iptables -L # 查看防火墙设置
# route -n # 查看路由表
# netstat -lntp # 查看所有监听端口
# netstat -antp # 查看所有已经建立的连接
# netstat -s # 查看网络统计信息
进程
# ps -ef # 查看所有进程
# top # 实时显示进程状态
用户
# w # 查看活动用户
# id <用户名> # 查看指定用户信息
# last # 查看用户登录日志
# cut -d: -f1 /etc/passwd # 查看系统所有用户
# cut -d: -f1 /etc/group # 查看系统所有组
# crontab -l # 查看当前用户的计划任务 -


相关文档:

Linux 编程经典书籍推荐

    成为一名精通 Linux
程序设计的高级程序员一直是不少朋友孜孜以求的目标。根据中华英才网统计数据,北京地区 Linux 程序员月薪平均为 Windows 程序员的
1.8 倍、Java 程序员的 2.6 倍, Linux 程序员年终奖金平均为 Windows 程序员的 2.9
倍。同时数据显示,随着工作经验的增长, Linux 程序员与 Win ......

linux下软件的安装(tar篇)

Linux软件的安装和卸载一直是困扰许多新用户的难题。在windows中,软件安装包一般是通过一个EXE可执行文件或者是自解压的压缩程序来安装软件的.而在Linux中,由于发行版本的不同,使用的软件包管理也是不相同的,在这我将最基本的tar源代码包的安装方法写在下边,由于我自己的水平一般,所以有不对的地方,希望能够得到您的意见,谢 ......

[基础]linux下强制踢掉登陆用户

[root@apl mail]# w
 17:38:08 up 2 days,  1:58,  5 users,  load average: 0.04, 0.09, 0.06
USER     TTY      from              LOGIN@   IDLE   JCPU&nb ......

[基础]常用linux命令 备查

=================文件操作==================
不使用find直接使用通配符对文件操作:
cp ./*/*attch* /testout_attch/
 
文件内容显示
head/tail:
  ## (1) displays the first 6 lines of a file
  head -6 readme.txt
  ## (2) displays the last 25 lines of a file
  tail -25 mail.txt
  # ......

linux磁盘性能测试

 120-test:/# apt-get install hdparm
真实机器120上测试结果:
测试磁盘性能(不cache)
120-test:/home/lai# hdparm -t /dev/sda
/dev/sda:
 Timing buffered disk reads:  346 MB in  3.02 seconds = 114.65 MB/sec
测试磁盘性能(带cache)
120-test:/home/lai# hdparm -T /dev/sda
/dev/s ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号