CentOS 7.0 Common Commands

Source: Internet
Author: User

1. Turn off the firewall

[Email protected] ~]# Systemctl stop Firewalld.service

One: View CPU information
More/proc/cpuinfo | grep "model name"
grep "model name"/proc/cpuinfo
grep "CPU"/proc/cpuinfo
grep "model Name"/proc/cpuinfo | Cut-f2-d:
Two: View memory information
grep memtotal/proc/meminfo
grep Memtotal/proc/meminfo | Cut-f2-d:
grep Memtotal/proc/meminfo | Free-m
grep Memtotal/proc/meminfo | grep "Mem"
grep Memtotal/proc/meminfo | awk ' {print $} '
Three: Check whether the CPU is 32-bit or 64-bit
Getconf Long_bit
Four: View the current Linux version information
Cat/etc/issue #查看具体操作系统类型
More/etc/redhat-release
Cat/etc/redhat-release
Rpm-q Centos-release
V: View kernel version
Uname-r
Uname-a
System operation and maintenance www.osyunwei.com warm reminder: qihang01 original content? Copyright, reproduced Please indicate the source and the original link
VI: View the current time of the system
Date
Clock
Clock-w #同步系统时间
Seven: View hard disks and partitions
Df-h
Fdisk-l
Du-sh #查看当前目录占用空间大小
Du/etc-sh #查看/etc directory occupy space size
Eight: View system-Installed packages
Cat-n/root/install.log #查看系统默认安装时的软件包
More/root/install.log | Wc-l #查看当前系统安装的软件包数量
Rpm-qa
Rpm-qa | Wc-l
Yum List Installed | Wc-l
Nine: View the keyboard layout
Cat/etc/sysconfig/keyboard
Cat/etc/sysconfig/keyboard | grep KEYTABLE | Cut-f2-d=
Ten: Check if SELinux is off
Sestatus
Sestatus | Cut-f2-d:
Cat/etc/sysconfig/selinux
System operation and maintenance www.osyunwei.com warm reminder: qihang01 original content? Copyright, reproduced Please indicate the source and the original link
11: View IP address, network card MAC address information
Ifconfig
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | grep ipaddr
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | Cut-f2-d=
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | Ifconfig eth0
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | Grep-v ' 127.0.0.1 '
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | Cut-d:-f2
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | awk ' {print '} '
Cat/etc/sysconfig/network
Cat/etc/resolv.conf #查看DNS
12: View system default language
Echo $LANG $LANGUAGE
cat/etc/sysconfig/i18n
12: View your time zone and whether to use UTC time
Cat/etc/sysconfig/clock
13: View Host Name
Hostname
Cat/etc/sysconfig/network
14: Check the system start-up run time
Uptime
Vmstat 1-s m procs

CentOS 7.0 Common Commands

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.