Common commands for Redhat and centos

Source: Internet
Author: User
View CPU information:
More/proc/cpuinfo | grep "model name"
Generally, it is a Xeon system.
View memory information:
Grep memtotal/proc/meminfo
Free-m
View the number of digits of the system:
Getconf long_bit
View the system version:
CAT/etc/RedHat-release
View the system kernel version:
Uname-R
Uname-
Use common commands to view the current time
Date
Use commands to view hard disks and partitions
DF-H
Fdisk-l
You can also view partitions.
Du-SH


DU/home-SH
View the directory size:


View installed software packages
CAT/root/install. Log
View normal system logs


Normal rpm Installation
Check the software packages installed:
Rpm-Qa
Rpm-Qa | WC-l
Yum List Installed | well


View the keyboard layout using common centos commands
CAT/etc/sysconfig/keyboard


View the IP address and MAC address:
Ifconfig


View the default system language:
Echo $ Lang $ Language
CAT/etc/sysconfig/i18n


Check whether the system uses UTC time
CAT/etc/sysconfig/clock


View Host Name
Hostname
CAT/etc/sysconfig/Network


View the system load:
Uptime
Vmstat 1-S M


Practical commands:
Download resources from wget URL
Decompress the tar zxvf compressed package name
Kill the process of an application


Find/-type F-size + 100000 K-ls
Search for files larger than 100000


Create a file system type
Umount/dev/sdb1
Mkfs-T ext2/dev/sdb1
Mount/dev/sdb1/practice


CAT/etc/rc. d/rc. Local
Du-SH
Uptime


CAT/proc/loadavg
22: Automatic startup settings
Vim/etc/rc. d/rc. Local
Du-SH: view the size of the specified directory
Uptime: view system running time, number of users, and load
CAT/proc/loadavg view system load
Edit the RC. Local file
# Vim/etc/rc. d/rc. Local
# Du-SH # view the size of a specified directory
# Uptime # view system running time, number of users, and load
# Cat/proc/loadavg # view system load
# Iptables-L # view firewall settings
# Route-N # view the route table
# Netstat-lntp # view all listening ports
# Netstat-antp # view all established connections
# Netstat-s # view network statistics
# W # view active users
# ID # view specified user information
# Last # view User Logon logs
# Cut-D:-F1/etc/passwd # view all users in the system
# Cut-D:-F1/etc/group # view all groups in the system
# Crontab-L # view the scheduled tasks of the current user
# Chkconfig-list # list all system services
# Chkconfig-list | grep on # list all started system services









Common commands for Redhat and centos

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.