首页 > 代码库 > Linux企业版5 系统入门 练习1
Linux企业版5 系统入门 练习1
[root@localhost ~]# uname // 查看当前系统
Linux
[root@localhost ~]# uname -r //查看内核版本
2.6.18-348.el5
[root@localhost ~]# uname -a //查看内核的详细信息
Linux localhost.localdomain 2.6.18-348.el5 #1 SMP Wed Nov 28 21:22:00 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# lsb_release -d
Description: Red Hat Enterprise Linux Server release 5.9 (Tikanga)
[root@localhost ~]# cat /etc/redhat-release //显示文档的首页信息
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
[root@localhost ~]# hostname //显示当前主机名
localhost.localdomain
[root@localhost ~]# hostname 1408 //给主机命名1408
[root@localhost ~]# hostname
1408
[root@localhost ~]# ifconfig eth0 //查看第一块网卡信息
eth0 Link encap:Ethernet HWaddr 00:0C:29:C2:46:AF
inet addr:192.168.182.230 Bcast:192.168.182.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec2:46af/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3152 (3.0 KiB) TX bytes:9297 (9.0 KiB)
[root@localhost ~]# ifconfig eth0 10.0.0.10 //定义端口IP地址为 10.0.0.10
[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:C2:46:AF
inet addr:10.0.0.10 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::20c:29ff:fec2:46af/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4322 (4.2 KiB) TX bytes:11051 (10.7 KiB)
[root@localhost ~]# cat /proc/cpuinfo //查看CPU详细信息
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
stepping : 9
cpu MHz : 3292.549
...
[root@localhost ~]# cat /proc/meminfo //查看内存详细信息
MemTotal: 1023848 kB
MemFree: 367560 kB
...
[root@localhost ~]# free -m //物理内存统计
total used free shared buffers cached
Mem: 999 642 356 0 31 359
-/+ buffers/cache: 251 747
Swap: 2047 0 2047
[root@localhost ~]# pwd
本文出自 “9526782” 博客,谢绝转载!
Linux企业版5 系统入门 练习1