Following lists frequently-used commands to determine ubuntu info,resources,partitions,network,process and so on.First,open terminal from Applications/Accessories/Terminal and type the commands.
System infomation
uname -a
#kernel/operating system/CPU info in brief.head -n 1 /etc/issue
#see the ubuntu version,same tocat /etc/issue
hostname
#hostnamelspci -tv
#list all PCI deviceslsusb -tv
#list all USB deviceslsmod
#list loaded kernel modesenv
#environment variable
Resources
free -m
#see the usage of memory and swapdf -h
#the usage of partitionsdu -sh
#see the size of the directory in M.grep MemTotal /proc/meminfo
#total size of RAMgrep MemFree /proc/meminfo
#free size of RAMuptime
#system running time,users,load averagecat /proc/loadavg
#load average
Disk and Partition
mount | column -t
#mount info about partitionsfdisk -l
#list all partitions,need root permissionswapon -s
#list all swap partitionshdparm -i /dev/sda
#list disk info (only for IDE)
Network
ifconfig
#list IP informationsroute -n
#list route tables netstat -lntp
#list listening ports netstat -antp
#list established links
Process
ps -ef
#list all processestop
#list processes and usage of system resource
User
id username
#list the user info. last
#list login recordcut -d: -f1 /etc/passwd
#list all users cut -d: -f1 /etc/group
#list all groupscrontab -l
#list scheduled tasks of current user
Service
chkconfig --list
#list all services chkconfig --list | grep on
#list all running services
No comments:
Post a Comment