日期:2014-05-16  浏览次数:20729 次

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

?

查看硬盘
[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有一个好处可以复制

?

?