List of commands determine system info/resources/partitions/process in Ubuntu Linux
Following lists frequently-used commands to determine ubuntu info,resources,partitions,network,process and so on.First,open terminal fromApplications/Accessories/Terminal and type the commands.
System infomation
#kernel/operating system/CPU info in brief.
#see the ubuntu version,same to
#hostname
#list all PCI devices
#list all USB devices
#list loaded kernel modes
#environment variable
Resources
#see the usage of memory and swap
#the usage of partitions
#see the size of the directory in M.
#total size of RAM
#free size of RAM
#system running time,users,load average
#load average
Disk and Partition
#mount info about partitions
#list all partitions,need root permission
#list all swap partitions
#list disk info (only for IDE)
Network
#list IP informations
#list route tables
#list listening ports
#list established links
Process
#list all processes
#list processes and usage of system resource
User
#list the user info.
#list login record
#list all users
#list all groups
#list scheduled tasks of current user
Service
#list all services
#list all running services
System infomation
uname -a
#kernel/operating system/CPU info in brief.
head -n 1 /etc/issue
#see the ubuntu version,same to
cat /etc/issue
hostname
#hostname
lspci -tv
#list all PCI devices
lsusb -tv
#list all USB devices
lsmod
#list loaded kernel modes
env
#environment variable
Resources
free -m
#see the usage of memory and swap
df -h
#the usage of partitions
du -sh
#see the size of the directory in M.
grep MemTotal /proc/meminfo
#total size of RAM
grep MemFree /proc/meminfo
#free size of RAM
uptime
#system running time,users,load average
cat /proc/loadavg
#load average
Disk and Partition
mount | column -t
#mount info about partitions
fdisk -l
#list all partitions,need root permission
swapon -s
#list all swap partitions
hdparm -i /dev/sda
#list disk info (only for IDE)
Network
ifconfig
#list IP informations
route -n
#list route tables
netstat -lntp
#list listening ports
netstat -antp
#list established links
Process
ps -ef
#list all processes
top
#list processes and usage of system resource
User
id username
#list the user info.
last
#list login record
cut -d: -f1 /etc/passwd
#list all users
cut -d: -f1 /etc/group
#list all groups
crontab -l
#list scheduled tasks of current user
Service
chkconfig --list
#list all services
chkconfig --list | grep on
#list all running services
0 comments:
Post a Comment