Linux Common Commands (1)-System command ____linux

Source: Internet
Author: User
#uname-A # Get Kernel version (and BSD version)
Power off #shutdown-h shutdown
#logout logoff
#reboot-N Reboot
#exit Exit Current User
#date Date
#cal Calendar
#echo $LANG Display System encoding
#echo $PATH View the PATH variable
#env (set) to view all environment variables
Ctrl-c Terminate command string

ctrl-d Close the command line


CPU Information
#grep ' physical id '/proc/cpuinfo | Sort-u//View the number of physical CPUs
Physical id:0
Physical Id:1
#grep ' core ID '/proc/cpuinfo | Sort-u | Wc-l//View Core quantity
6
#grep ' Processor '/proc/cpuinfo | Sort-u | Wc-l//view number of threads
24
Represents 2 CPUs, a total of 6 cores, so each CPU has 3 cores. Total 24 threads So there are 4 threads per core.
# Ps-ef #查看所有进程
Ps-ef|grep Java View all Java processes
or PS aux|grep java
# Top #实时显示进程状态

# free-m # View memory usage and swap area usage


Yum (full name is Yellow Dog Updater, Modified)
is a shell front-end package manager in Fedora and Redhat as well as in SuSE. Based on the RPM package management, can automatically download the RPM package from the specified server and install, can automatically handle dependencies, and install all the dependent software package, without tedious downloading, installation. Yum provides commands for locating, installing, and deleting one, one, or even all packages.
All configuration information for 1.yum is stored in a configuration file called yum.conf, usually located in the/etc directory
# more/etc/yum.conf
[Main]
cachedir=/var/cache/yum/$basearch/$releasever
Keepcache=0
debuglevel=2
Logfile=/var/log/yum.log
Exactarch=1
Obsoletes=1
Gpgcheck=1
Plugins=1
Installonly_limit=5
Bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_ Page.php?category=yum
Distroverpkg=centos-release

Cachedir:yum Cache directory, yum this store to download the RPM package and database, generally/var/cache/yum.
DebugLevel: Debug level, 0──10, default is 2
Logfile:yum log file, default is/var/log/yum.log.
Exactarch, there are two options 1 and 0, whether to upgrade only and you install the package CPU system consistent package, if set to 1, if you install a i386 rpm, then Yum will not use 686 of the package to upgrade.
Gpgchkeck= has 1 and 2 choices, representing whether or not a GPG check is performed, and if not, the default seems to be checked.
Plugins=1 whether plug-ins are enabled, default 1 is allowed, and 0 is not allowed. We usually use yum-fastestmirror this plugin.
Bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_ Page.php?category=yum

Yum-fastestmirror This plugin is installed by default in CentOS. Generate configuration file/etc/yum/pluginconf.d/fastestmirror.conf. The Hostfilepath field in the configuration file,
The configuration file used to define the Yum source 64-bit CentOS is in the/var/cache/yum/x86_64/6/timedhosts.txt file
#more/var/cache/yum/x86_64/6/timedhosts.txt
mirror.duomenucentras.lt 0.626835823059
ftp.riken.jp 0.100260019302
be.mirror.eurid.eu 99999999999
mirrors.ustc.edu.cn 0.0250010490417
Kartolo.sby.datautama.net.id 0.134171009064
mirrors.hust.edu.cn 0.0555770397186
ftp.wa.co.za 0.959823131561
Repos.dfw.lax-noc.com 0.730024814606
ftp.jaist.ac.jp 0.317898035049
Mir01.syntis.net 0.67763209343
Www.jules.fm 0.64072394371
Mirror.us.leaseweb.net 0.63973903656
mirrors.ircam.fr 0.879976034164
reflector.westga.edu 0.661612033844
Mirrors.btte.net 0.00662684440613
Elrepo.mirrors.arminco.com 99999999999
Mirror.premi.st 0.113877058029
ftp.nluug.nl 0.247643947601
Mirror.symnds.com 1.49860787392
Repoforge.mirror.constant.com 0.467201948166
Jur-linux.org 0.719459056854
mirror.web24.net.au 0.571315050125
Mirrors.hustunique.com 0.0969710350037
Mirror1.hs-esslingen.de 0.358834981918
Mirrors.neterra.net 0.226689100266
Elrepo.org 0.494369983673
Epel.mirror.srv.co.ge 0.479194879532
Mirror.de.leaseweb.net 0.412769079208
Mirror.ate.info 0.270224094391
mirrors.vinahost.vn 0.103198051453
Repos.mia.lax-noc.com 0.718173027039
Mirror.cedia.org.ec 1.42782497406
Mirror.oss.maxcdn.com 0.39691400528
ftp.sjtu.edu.cn 0.0983200073242
mirror.oscc.org.my 0.13619685173
Repos.lax-noc.com 0.333950042725
archive.cs.uu.nl 0.266149997711
mirrors.biztelecom.ro 1.19153594971
Mirror.as24220.net 2.04470896721
ftp.lug.ro 0.241106033325
repoforge.eecs.wsu.edu 0.228137016296
Mirror.nexcess.net 0.305619001389
ftp.utexas.edu 0.730792999268
Ftp.osuosl.org 0.376509189606
Mirror.smartmedia.net.id 0.375988960266
mirrors.xservers.ro 0.818087816238
Mirrors.aliyun.com 0.0343389511108
centos.ustc.edu.cn 0.0259599685669
apt.sw.be 0.687570810318
mirror.vutbr.cz 0.226994037628
ftp.fi.muni.cz 0.900695085526
ftp.heanet.ie 0.302590847015
Mirror.bacloud.com 0.240998029709
Mirror.teklinks.com 0.472333908081
Mirror.nl.leaseweb.net 0.416785001755
Ftp.colocall.net 0.273925065994
mirror.chpc.utah.edu 0.630470991135
Mirror-fpt-telecom.fpt.net 0.348951101303
Mirrors.nayatel.com 1.30136990547
repoforge.cu.be 1.70120191574
mirrors.neusoft.edu.cn 0.0410919189453
Ftp.neowiz.com 2.19368386269
Mirrors.yun-idc.com 0.00449705123901
mirror.neu.edu.cn 0.0517408847809
Mirrors.coreix.net 0.549510002136
nl.mirror.eurid.eu 3.09500288963
mirror.crazynetwork.it 0.894299983978
MIRRORS.ISPROS.COM.BD 0.393970966339
Ftp.tu-chemnitz.de 0.376055002213
mirror.rit.edu 99999999999
ftp.ne.jp 0.401192903519
miroir.univ-paris13.fr 0.613070011139
Mirror.imt-systems.com 1.00909614563
mirrors.nwsuaf.edu.cn 0.0503330230713
Mirror.webnx.com 0.953099012375
Mirror.datacenter.mn 1.78583312035
Mirrors.thzhost.com 0.568395137787
ftp.cc.uoc.gr 0.460900068283
mirrors.123host.vn 0.118564844131
ftp6.sjtu.edu.cn 99999999999
mirrors.digipower.vn 1.26699399948
Www.mirrorservice.org 0.440870046616
mirror.bit.edu.cn 0.00562500953674
Mirrors.pubyun.com 0.0638098716736
ftp.ines.lug.ro 0.238677024841
Mirror.zetup.net 1.35125899315
mirror.hmc.edu 0.477596998215
Mirrors.163.com 0.0325629711151
repoforge.xpg.com.br 2.03537797928
MIRROR.PW 0.632874011993
merlin.fit.vutbr.cz 0.228477954865
Fr2.rpmfind.net 0.205313920975
mirror.ventraip.net.au 0.667757034302
Elrepo.reloumirrors.net 0.893438100815
Mirror.team-cymru.org 99999999999
Repoforge.gtdinternet.com 0.975768089294

Eg: #yum list gcc view installation of GCC
Loaded Plugins:fastestmirror
Loading mirror speeds from cached hostfile
* base:mirrors.yun-idc.com
* elrepo:elrepo.org
* epel:mirrors.ustc.edu.cn
* extras:mirrors.yun-idc.com
* rpmforge:mirrors.neusoft.edu.cn
* updates:mirror.bit.edu.cn
You can see that mirroring was used: mirrors.yun-idc.com,

Common Yum Commands:
Yum Search uses Yum to find packages
Yum Install Package1 Install the specified installation package Package1
Yum Update Package1 the specified package Package1
Yum Info package1 Display installation package information Package1
Yum List Package1 shows the installation of the specified package Package1
Yum Remove Package1 Removal package Package1
Yum Clean packages clears the packages under the cache directory

Linux noun explanation
(bash) Bash Bourne Again Shell

The grep grobal regular Expression Print specifies that the file searches for specific content and then outputs the rows that contain the content.

Yum (Yellow Dog Updater, Modified) is a shell front-end package manager in Fedora and Redhat as well as SuSE.

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.