linux常用查看命令
查看系统
[oracle@dev ~]$ uname
Linux
[oracle@dev ~]$ uname -i
x86_64
查看机器名 及对应IP
[oracle@dev ~]$ hostname
dev
[oracle@dev ~]$ hostname -i
127.0.0.1
查看语言
[oracle@dev ~]$ echo $LANG
zh_CN.UTF-8
查看环境变量
[oracle@dev ~]$ env
查看内存
[oracle@dev ~]$ free
total used free shared buffers cached
Mem: 2234368 2214316 20052 0 107840 544796
-/+ buffers/cache: 1561680 672688
Swap: 5144568 0 5144568
查看CPU使用率
[root@oracle ~]# top
top - 15:24:56 up 13 days, 20:51, 3 users, load average: 0.03, 0.04, 0.01
Tasks: 256 total, 1 running, 255 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.3%us, 0.5%sy, 0.0%ni, 98.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 16445936k total, 15835608k used, 610328k free, 401916k buffers
Swap: 8385920k total, 0k used, 8385920k free, 11460552k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3130 couchbas 20 0 323m 156m 1880 S 3.7 1.0 982:23.47 beam.smp
3606 couchbas 20 0 389m 200m 2096 S 1.0 1.2 281:58.23 memcached
3752 oracle -2 0 2293m 15m 13m S 0.7 0.1 128:42.58 oracle
查看硬盘
[oracle@dev ~]$ df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
198036472 19699804 168114692 11% /
/dev/sda1 101086 14345 81522 15% /boot
tmpfs 1116776 0 1116776 0% /dev/shm
none 1116776 104 1116672 1% /var/lib/xenstored
查看JDK
[oracle@dev ~]$ java -version
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
查看当前目录
[oracle@dev ~]$ pwd
/home/oracle
查看文件
[oracle@dev ~]$ ls
bea Desktop nohup.out
查看进程
[oracle@dev ~]$ ps
PID TTY TIME CMD
5778 pts/2 00:00:00 bash
6014 pts/2 00:00:00 ps
查看文件
[oracle@dev ~]$ cat /etc/hosts
编辑
[oracle@dev ~]$ vi /etc/hosts
[oracle@dev ~]$ vim /etc/hosts vim有一个好处可以复制
上一篇: jQuery插件开发详解
下一篇: linux常用查看命令