Summary of commands for viewing various devices and resources in Ubuntu

Source: Internet
Author: User

First, System Information

1. View kernel information: $uname-A
2. View operating system version: $head-n 1/etc/issue
3. View CPU information: $cat/proc/cpuinfo
4. View computer Name: $hostname
5. List all PCI device information: $LSPCI-TV
6. List all USB device information: $lsusb-TV
7. List the system-loaded module information: $lsmod
Second, the use of system resources
1. View memory and Swap partition usage: $free-M
2. View the usage of the hard disk partition: $DF-H
3. View the size of a directory: $du-sh< directory >
4. View the total amount of memory and the amount of free storage: $grep Memtotal/proc/meminfo
$grep Memfree/proc/meminfo
5. View system uptime, number of users, and load: $uptime
6. View system load: $cat/proc/loadavg
Third, hard disk and partition information
1. View mount partition information: $mount |column-t
2. View hard disk partition information: $sudo fdisk-l
3. View all swap partition information: $swapon-S
4. View hard Drive parameter information: $sudo hdparm-i/dev/had
Iv. Network Information
1. View network interface information: $ifconfig
2. View firewall settings information: $iptables-L
3. View the routing table information: $route-N
4. View information for all listening ports: $netstat-LNTP
5. View information for all established connections: $netstat-ANTP
6. View network statistics Information: $netstat-S
V. Viewing information about a system process
1. View information for all processes: $ps-ef
2. View information about the current process: $top
Vi. viewing information about the user
1. View information about the current activity: $w or $who
2. View the information for the specified user: $id < user name >
3. View user logon log: $last
4. View the current user's scheduled tasks: $crontab-L
Vii. View the installation package information: $dpkg-l< software name >

Summary of commands for viewing various devices and resources in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.