系统

liunx

系统介绍

系统版本

系统信息
1 uname

[root@oldboy56-201 ~]# uname --help  
  -a, --all                print all information, in the following order,  
                             except omit -p and -i if 	unknown:  
  -s, --kernel-name        print the kernel name  
  -n, --nodename           print the network node hostname  
  -r, --kernel-release     print the kernel release  
  -v, --kernel-version     print the kernel version  
  -m, --machine            print the machine hardware name  
  -p, --processor          print the processor type or "unknown"  
  -i, --hardware-platform  print the hardware platform or "unknown"  
  -o, --operating-system   print the operating system  
  --help     display this help and exit  
  --version  output version information and exit  
1. uname -r 版本详细号  
	[root@oldboy56-201 ~]# uname -r  
	3.10.0-862.el7.x86_64#详解3主版本号,10为副版本号 奇数为开发版本偶数为修订版本的
	0-862修改了862次
	el7 为redhat enterprise liunx7
	X86_64编译框架
2. uname -i 硬件平台
[root@oldboy56-201 ~]# uname -i
x86_64 
3. 单词  
kernel:kernel英 [ˈkɜ:nl] 美 [ˈkɜ:rnl]n.核;核心;  
node英 [nəʊd] 美 [noʊd]n.节点;(计算机网络的)节点;[医]结节;植物的节  
platform 英 [ˈplætfɔ:m] 美 [ˈplætfɔ:rm] n.平台;台;站台;纲领  
operating英 ['ɒpəreɪtɪŋ] 美 [ˈɑpəˌretɪŋ]adj.操作的;营运的;业务上的;外科手术的v.运转;操作( operate的现在分词);管理;做外科手术
  1. 红帽的版本
    [root@oldboy56-201 ~]# cat /etc/redhat-release
    CentOS Linux release 7.5.1804 (Core)
  2. 读取系统配置文件
    [root@oldboy56-201 ~]# cat /proc/version
    Linux version 3.10.0-862.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Fri Apr 20 16:44:24 UTC 2018

硬件信息
cpu版本信息

lscpu

[root@oldboy56-201 ~]# lscpu  
Architecture:          x86_64  
CPU op-mode(s):        32-bit, 64-bit  
Byte Order:            Little Endian  
CPU(s):                1  
On-line CPU(s) list:   0  
Thread(s) per core:    1  
Core(s) per socket:    1  
Socket(s):             1  
NUMA node(s):          1  
Vendor ID:             GenuineIntel  
CPU family:            6  
Model:                 61  
Model name:            Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz  
Stepping:              4  
CPU MHz:               2194.980  
BogoMIPS:              4389.96   
Hypervisor vendor:     VMware  
Virtualization type:   full   
L1d cache:             32K    
L1i cache:             32K  
L2 cache:              256K  
L3 cache:              3072K  
NUMA node0 CPU(s):     0  
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch epb fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap xsaveopt dtherm ida arat pln pts  

查看cpu配置文件

[root@oldboy56-201 ~]# cat  /proc/cpuinfo  
processor	: 0  
vendor_id	: GenuineIntel  
cpu family	: 6  
model		: 61  
model name	: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz  
stepping	: 4  
microcode	: 0x21  
cpu MHz		: 2194.980  
cache size	: 3072 KB  
physical id	: 0  
siblings	: 1   
core id		: 0  
cpu cores	: 1  
apicid		: 0  
initial apicid	: 0  
fpu		: yes  
fpu_exception	: yes  
cpuid level	: 20  
wp		: yes  
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch epb fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap xsaveopt dtherm ida arat pln pts
bogomips	: 4389.96  
clflush size	: 64   
cache_alignment	: 64  
address sizes	: 42 bits physical, 48 bits virtual  
power management:

系统运行流程

系统重启&关机
1 shutdown

单词
halt 英 [hɔ:lt] 美 [hɔlt]n.暂停;停止,中止;   
[root@oldboy56-201 ~]# shutdown --help  
  		-H --halt      Halt the machine  
  		-P --poweroff  Power-off the machine  
  		-r --reboot    Reboot the machine  
 	    -h             Equivalent to --poweroff, overridden by --halt  
  		-k             Don't halt/power-off/reboot, just send warnings  
    	--no-wall   Don't send wall message before halt/power-off/reboot  
 		-c             Cancel a pending shutdown  
[root@oldboy56-201 ~]# shutdown -h now/0  
[root@oldboy56-201 ~]# shutdown -f 0 == reboot  

系统运行过程
电源==》BOIS开机自检(cpu,内存,显卡)》mbr主硬盘引导》grup选择内核==》加载内核 Centos6 》运行init进程》读取运行级别==》设置主机ip==》运行开机自启动逐个运行服务
Centos7 》systemd》读取运行级别==》系统初始化==》并行运行服务

系统时间

系统时间
date +%Y-%m-%d 年月日===%F
date +%T时间
date +%H:%M:%S 时分秒
%W周几

系统用户访问

查看谁在访问

  1. whoami==id -un
    [xingchao@oldboy56-201 root]$ id -un
    xingchao
    [xingchao@oldboy56-201 root]$ whoami
    xingchao

  2. w
    [root@oldboy56-201 ~]# w
    21:52:23 up 5:50, 3 users, load average: 0.00, 0.01, 0.05
    USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
    root pts/0 10.0.0.1 17:21 4:30m 0.03s 0.03s -bash
    root pts/1 10.0.0.1 20:08 5:27 0.08s 0.08s -bash
    root pts/2 10.0.0.1 21:48 7.00s 0.09s 0.00s w
    名称 tty号 远程主机ip 登录时间 空闲时间 JCPU时间)当前进程所用时间(PCPU时间)用户当前正在使用的命令

  3. who who命令用于列举出当前已登录系统的用户名称
    [root@oldboy56-201 ~]# who
    root pts/0 2019-01-05 17:21 (10.0.0.1)
    root pts/1 2019-01-05 20:08 (10.0.0.1)
    用户名 tty号 时间日期 主机地址。

  4. users 可用于打印输出登录服务器的用户名称 如果某用户使用了多个终端,则相应的会显示多个重复的用户名
    [root@oldboy56-201 ~]# users
    root root root#使用三个终端

  5. 查看用户的历史信息
    [root@oldboy56-201 ~]# last root ==last
    root pts/1 10.0.0.1 Sat Jan 5 20:08 still logged in
    root pts/0 10.0.0.1 Sat Jan 5 17:21 still logged in
    root pts/0 10.0.0.1 Sat Jan 5 14:54 - 17:20 (02:26)
    用户名称 tty设备号 历史登录时间 日期登出时间 日期总工作时间

  6. lastlog
    检查最后一次登录本系统的用户登录的时间信息不能登录的为伪用户显示但是总没有登录过
    [root@oldboy56-201 ~]# lastlog
    Username Port From Latest
    root pts/0 10.0.0.1 Sat Jan 5 22:04:07 +0800 2019
    bin Never logged in
    adm Never logged in
    oldgirl Never logged in
    mysql pts/0 Sat Jan 5 11:13:25 +0800 2019
    www pts/0 Sat Jan 5 10:58:37 +0800 2019
    xingchao pts/1 Sat Jan 5 21:41:47 +0800 2019

  7. last 列出目前与过去登入系统的用户信息,只要有人登录,就会被记录,包括多次登录的信息,也会被统计记录下来。
    [root@oldboy56-201 ~]# last
    root pts/0 10.0.0.1 Sat Jan 5 22:04 still logged in
    root pts/2 10.0.0.1 Sat Jan 5 21:48 still logged in
    root pts/1 10.0.0.1 Sat Jan 5 20:08 still logged in
    root pts/0 10.0.0.1 Sat Jan 5 17:21 - 22:01 (04:40)
    root pts/0 10.0.0.1 Sat Jan 5 14:54 - 17:20 (02:26)
    reboot system boot 3.10.0-862.el7.x Sat Jan 5 14:51 - 22:18 (07:27)
    root pts/2 10.0.0.1 Sat Jan 5 14:04 - crash (00:46)
    root pts/1 10.0.0.1 Sat Jan 5 12:27 - crash (02:23)
    root pts/0 10.0.0.1 Sat Jan 5 11:13 - crash (03:37)
    root pts/0 10.0.0.1 Sat Jan 5 10:51 - 11:13 (00:21)
    root pts/0 10.0.0.1 Fri Jan 4 22:37 - 22:44 (00:06)
    root pts/0 10.0.0.1 Thu Jan 3 21:50 - 22:37 (00:47)
    reboot system boot 3.10.0-862.el7.x Thu Jan 3 21:46 - 22:18 (2+00:32)
    root pts/3 10.0.0.1 Sun Dec 30 17:01 - 17:33 (00:32)
    root pts/0 10.0.0.1 Sun Dec 30 09:35 - 14:41 (05:05)
    reboot system boot 3.10.0-862.el7.x Sun Dec 30 09:35 - 22:18 (6+12:43)
    root pts/1 10.0.0.1 Fri Dec 28 21:25 - down (01:48)
    root pts/0 10.0.0.1 Mon Dec 24 20:29 - down (4+02:44)
    reboot system boot 3.10.0-862.el7.x Mon Dec 24 20:28 - 23:13 (4+02:45)
    root pts/1 10.0.0.1 Sun Dec 23 19:50 - 22:47 (02:56)
    root pts/2 10.0.0.1 Sun Dec 23 14:13 - 21:40 (07:27)
    root pts/0 10.0.0.1 Sun Dec 23 14:10 - 21:40 (07:29)
    root pts/1 10.0.0.1 Sun Dec 23 11:30 - 15:35 (04:04)
    root pts/1 10.0.0.1 Sun Dec 23 11:29 - 11:30 (00:00)
    root pts/1 10.0.0.1 Sun Dec 23 10:31 - 11:29 (00:58)
    root pts/0 10.0.0.1 Wed Dec 19 21:07 - 13:28 (3+16:20)
    root pts/0 10.0.0.1 Wed Dec 19 20:46 - 21:07 (00:21)
    root pts/0 10.0.0.1 Tue Dec 18 22:49 - 23:00 (00:10)
    root pts/1 10.0.0.1 Tue Dec 18 22:07 - 22:11 (00:04)
    root pts/0 10.0.0.1 Tue Dec 18 21:33 - 22:11 (00:38)
    reboot system boot 3.10.0-862.el7.x Tue Dec 18 20:59 - 22:47 (5+01:47)
    root pts/1 10.0.0.1 Mon Dec 17 22:51 - crash (22:08)
    root pts/0 10.0.0.1 Mon Dec 17 22:16 - crash (22:43)
    root pts/0 10.0.0.1 Mon Dec 17 21:45 - 22:16 (00:30)
    reboot system boot 3.10.0-862.el7.x Mon Dec 17 21:45 - 22:47 (6+01:01)
    root pts/0 10.0.0.1 Mon Dec 17 20:04 - crash (01:40)
    reboot system boot 3.10.0-862.el7.x Mon Dec 17 19:57 - 22:47 (6+02:50)
    root pts/0 10.0.0.1 Sun Dec 16 17:02 - crash (1+02:54)
    root pts/0 10.0.0.1 Sun Dec 16 16:21 - 17:02 (00:41)
    reboot system boot 3.10.0-862.el7.x Sun Dec 16 16:19 - 22:47 (7+06:27)
    root pts/1 10.0.0.1 Sun Dec 16 12:23 - crash (03:56)
    root pts/0 10.0.0.1 Sun Dec 16 09:34 - 14:40 (05:06)
    reboot system boot 3.10.0-862.el7.x Sun Dec 16 09:32 - 22:47 (7+13:14)
    root pts/0 10.0.0.1 Sun Dec 2 20:41 - crash (13+12:51)
    reboot system boot 3.10.0-862.el7.x Sun Dec 2 20:40 - 22:47 (21+02:06)
    root pts/1 10.0.0.1 Sun Dec 2 20:39 - down (00:01)
    reboot system boot 3.10.0-862.el7.x Sun Dec 2 19:49 - 20:40 (00:50)
    root pts/1 10.0.0.1 Sun Dec 2 18:05 - 18:05 (00:00)
    root pts/1 10.0.0.1 Sun Dec 2 17:45 - 18:05 (00:19)
    root pts/1 10.0.0.1 Sun Dec 2 10:41 - 14:22 (03:40)
    root pts/0 10.0.0.1 Sun Dec 2 09:37 - 13:34 (03:56)
    reboot system boot 3.10.0-862.el7.x Sun Dec 2 09:37 - 18:36 (08:58)
    root pts/1 10.0.0.1 Sun Nov 25 16:27 - down (04:10)
    root pts/0 10.0.0.1 Sun Nov 25 16:11 - 18:33 (02:21)
    root tty1 Sun Nov 25 15:55 - 20:37 (04:42)
    reboot system boot 3.10.0-862.el7.x Sun Nov 25 15:54 - 20:37 (04:43)
    wtmp begins Sun Nov 25 15:54:39 2018

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值