Linux View CentOS System Information (number of version system digits)

Source: Internet
Author: User
Tags memory usage centos


To view the version of the CentOS kernel:

1) [Root@localhost ~]# cat/proc/version

Linux version 2.6.18-194.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri A PR 2 14:58:14 EDT 2010

2)

[Root@localhost ~]# Uname-a

Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT x86_64 x86_64 x86_64 gnu/linux

3)

[Root@localhost ~]# Uname-r

2.6.18-194.el5

2. View Linux version:

1 List all version information,

[Root@localhost ~]# Lsb_release-a

LSB Version:: core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32: Graphics-3.1-noarch

Distributor Id:centos

Description:centos Release 5.5 (Final)

release:5.5

Codename:final

Note: This command applies to all Linux, including Redhat, SuSE, Debian and other distributions.

2 Execute the Cat/etc/issue, for example, as follows:

[Root@localhost ~]# Cat/etc/issue

CentOS Release 5.5 (Final)

Kernel R on a m

3 Execute the Cat/etc/redhat-release, for example, as follows:

[Root@localhost ~]# Cat/etc/redhat-release

CentOS Release 5.5 (Final)

Check to see if the system is 64-bit or 32-bit:

1, getconf long_bit or getconf word_bit

[Root@localhost ~]# getconf Long_bit

64

2, File/bin/ls

[Root@localhost ~]# File/bin/ls

/bin/ls:elf 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses shared Lib s), for Gnu/linux 2.6.9, stripped

3, Lsb_release-a

[Root@localhost ~]# Lsb_release-a

LSB Version:: core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32: Graphics-3.1-noarch

Distributor Id:centos

Description:centos Release 5.5 (Final)

release:5.5

Codename:final

In Linux, we need to manipulate anything to use the command mode to operate, so if you want to master Linux server friends can see more of this tutorial, as we have seized the system version has used a few lines of command!

Add:

Linux System Information
# uname-a # View kernel/operating system/CPU information
# head-n 1/etc/issue # View operating system version
# cat/proc/cpuinfo # View CPU Information
# hostname # View computer name
# LSPCI-TV # list all PCI devices
# LSUSB-TV # list all USB devices
# lsmod # list the loaded kernel modules
# env # View Environment variables
# Arch Display machine's processor architecture (1)
# UNAME-M Displays the processor architecture of the machine (2)
# UNAME-R Displays the kernel version being used
# dmidecode-q Display hardware system parts
# hdparm-i/dev/hda A list of the architectural features of a disk
# HDPARM-TT/DEV/SDA performs a test read operation on disk
# cat/proc/interrupts Show interrupts
# cat/proc/meminfo Check Memory usage
# Cat/proc/swaps shows which swap is used
# Cat/proc/version Displays the kernel version
# Cat/proc/net/dev Display network adapters and statistics
# cat/proc/mounts Displays the loaded file system
# LSPCI-TV List PCI devices
# LSUSB-TV Display USB devices
# Date Displays system dates
# cal 2007 Displays the calendar for 2007 years
# date 041217002007.00 Set day and time – month and year. seconds
# Clock-w saves time changes to BIOS
Shutdown, reboot, and logout of the system
# shutdown-h now Shutdown system (1)
# init 0 Shutdown System (2)
# Telinit 0 Shutdown System (3)
# shutdown-h Hours:minutes & Shut down system at scheduled time
# shutdown-c Cancel the system at scheduled time
# Shutdown-r now reboot (1)
# reboot reboot (2)
# Logout Logout
How to view Linux system resources
# free-m # View memory usage and swap area usage
# df-h # View the usage of each partition
# du-sh < directory name > # View the size of the specified directory
# grep Memtotal/proc/meminfo # View Total Memory
# grep Memfree/proc/meminfo # View Idle memory
# uptime # View system run time, number of users, load
# cat/proc/loadavg # View System load
How to view Linux disks and partitions
# Mount | COLUMN-T # View the partition status of the hook
# fdisk-l # View all partitions
# swapon-s # View all swap partitions
# hdparm-i/dev/hda # View disk parameters (IDE devices only)
# DMESG | grep IDE # View IDE Device detection status at startup
To view the commands for network configuration
# ifconfig # View properties of all network interfaces
# iptables-l # View firewall settings
# route-n # View the routing table
# netstat-lntp # View all listening ports
# netstat-antp # View all connections that have been established
# netstat-s # View Network statistics
View Linux Processes
# ps-ef # View All Processes
# top # Real-time display of process status
View user's commands
# w # View active Users
# ID < user name > # view specified user information
# last # View User login log
# cut-d:-f1/etc/passwd # View All users of the system
# cut-d:-f1/etc/group # View all groups of the system
# crontab-l # View scheduled tasks for the current user
To view commands for system services
# chkconfig–list # List all system services
# Chkconfig–list | grep on # Lists all initiated system services
Commands for installing programs
# rpm-qa # View all installed Packages
command to get help
#man < command > #获得命令帮助

Related Article

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.