访问手机版  

Linux常用命令|Linux培训学习|考试认证|工资待遇与招聘,认准超级网工!

招聘|合作 登陆|注册

网络工程师培训

当前位置:网络工程师 > 技术课程 > linux > 热点关注 > linux常用命令

LINUX最常用的系统状态查询命令

时间:2019-07-22

linux命令windows命令_linux常用命令_linux关机命令重启命令

LINUX常用的系统状态查询命令

# lsdev ?C ?s scsi

列出各个SCSI设备的所有相关信息:如逻辑单元号linux常用命令,硬件地址及设备文件名等。

# ps -ef

列出正在运行的所有进程的各种信息:如进程号及进程名等。

# netstat -rn

列出网卡状态及路由信息等。

# netstat -in

列出网卡状态及网络配置信息。

# df -k

列出已加载的逻辑卷及其大小信息。

# mount

列出已加载的逻辑卷及其加载位置。

# uname -a

列出系统ID 号,系统名称,OS版本等信息。

# hostname

列出系统网络名称。

# lsvg ?l rootvg,lsvg ?p rootvg

显示逻辑卷组信息,如包含哪些物理盘及逻辑卷等。

# lslv ?l datalv,lslv ?p datalv

显示逻辑卷各种信息,如包含哪些盘linux常用命令,是否有镜像等。

八网络故障定位方法

网络不通的诊断过程:

ifconfig查看网卡是否启动 (up)

netstat ?i查看网卡状态

Ierrs/Ipkts和Oerrs/Opkts是否>1%

ping自己网卡地址 (ip地址)

ping其它机器地址,如不通,在其机器上用diag检测网卡是否有问题。

在同一网中,subnetmask应一致。

网络配置的基本方法:

(1) 如需修改网络地址、主机名等,一定要用chdev命令

# chdev ?l inet0 ?a hostname=myhost

linux关机命令重启命令_linux常用命令_linux命令windows命令

# chdev -l en0 -a netaddr=’Array.3.240.58’ -a netmask=255.255.255.0’

(2) 查看网卡状态:# lsdev ?Cc if

(3) 确认网络地址:# ifconfig en0

(4) 启动网卡:# ifconfig en0 up

(5) 配置路由

有两种方式加入路由:

永久路由

# chdev -l inet0 -a route=’10.47.0.0’,’Array.3.240.5Array’

临时路由

# route add 10.47.1.2 Array.3.240.5Array

用命令netstat -rn查看路由表

附:常用命令列表:

Any XXXX, ####, ****, or X is to be substituted by a name, resource name or #,

fn = filename

DIR = Directory

| = pipe symbol

bosboot -a -d /dev/hdiskx -rebuilds boot record/image on boot device(hdiskx)

cat -view contents of a file

cat /tmp/****.1 -view a file, look at output

cat fnfn > newfile -combines two files to a single file

cd -will return you to default DIR

cd / -will put in root DIR

cd /xxxx -change you to a DIR anywhere is system

cd .. -will drop you out of 1 DIR at a time

cd xxxxx -will change you to a DIR in current dir

cfgmgr -will auto config devices

 上一个教程:linux项目大全