标签:vpc top 名称 flush 内核 config kernel nfs which
博客一、第一次写博客,希望大家多多包涵。如有不足,欢迎大佬们多多指点。纪念一下自己的学习经历。
二、Linux基础学习
[root@centos7~]#cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)
[root@centos7~]#runlevel
N 5
[root@centos7~]#hostname
centos7.5.localdomain
[root@centos7sysconfig]#hostnamectl set-hostname centos7.55.localdomain
[root@centos7sysconfig]#hostname
centos7.55.localdomain
[root@centos7sysconfig]#uname -r
3.10.0-862.el7.x86_64
[root@centos7sysconfig]#free -h
total used free shared buff/cache available
Mem: 1.0G 398M 274M 8.7M 359M 434M
Swap: 2.0G 0B 2.0G
[root@centos7sysconfig]#cat /proc/meminfo
MemTotal: 1057372 kB
MemFree: 281416 kB
MemAvailable: 444388 kB
Buffers: 2092 kB
Cached: 282076 kB
SwapCached: 0 kB
Active: 328384 kB
Inactive: 244428 kB
Active(anon): 289568 kB
Inactive(anon): 8032 kB
Active(file): 38816 kB
Inactive(file): 236396 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 2097148 kB
SwapFree: 2097148 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 288772 kB
Mapped: 91648 kB
Shmem: 8956 kB
Slab: 83664 kB
SReclaimable: 31396 kB
SUnreclaim: 52268 kB
KernelStack: 7136 kB
PageTables: 22740 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2625832 kB
Committed_AS: 1934240 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 183508 kB
VmallocChunk: 34359310332 kB
HardwareCorrupted: 0 kB
AnonHugePages: 73728 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 96128 kB
DirectMap2M: 1013760 kB
DirectMap1G: 0 kB
查看CPU
[root@centos7sysconfig]#lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 94
Model name: Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz
Stepping: 3
CPU MHz: 2303.997
CPU max MHz: 0.0000
CPU min MHz: 0.0000
BogoMIPS: 4607.99
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0,1
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 aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch epb fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 invpcid rtm rdseed adx smap xsaveopt ibpb ibrs stibp dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp spec_ctrl intel_stibp
[root@centos7sysconfig]#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 200G 0 disk
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 50G 0 part /
├─sda3 8:3 0 2G 0 part [SWAP]
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 20G 0 part /data
sr0 11:0 1 8.8G 0 rom
[root@centos7sysconfig]#id -u root
0
[root@centos7sysconfig]#id -u zhang
1000
[root@centos7sysconfig]#whoami
root
[root@centos7sysconfig]#who am i
root pts/0 2019-07-17 10:02 (192.168.13.1)
[root@centos7sysconfig]#w
10:36:56 up 34 min, 1 user, load average: 0.04, 0.04, 0.05
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.13.1 10:02 0.00s 0.22s 0.03s w
[root@centos7sysconfig]#cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/usr/bin/sh
/usr/bin/bash
/usr/sbin/nologin
/bin/tcsh
/bin/csh
[root@centos7sysconfig]#echo $SHELL
/bin/bash
[root@centos7sysconfig]#/bin/csh
[root@centos7 sysconfig]# echo $SHELL
/bin/bash
[root@centos7~]#pwd
/root
[root@centos7 ~]#PS1="\[\e[1;5;41;33m\][\u@\h \W]\\$\[\e[0m\]"
vim /etc/gdm/custom.conf
# GDM configuration storage
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=root
[security]
[xdmcp]
[chooser]
[root@centos7~]#alias cdnet=‘cd /etc/sysconfig/network-scripts/‘
[root@centos7~]#cdnet
[root@centos7network-scripts]#
[root@centos7~]#vim .bashrc
alias cdnet=‘cd /etc/sysconfig/network-scripts/‘
[root@centos7~]#cd /etc/sysconfig/network-scripts/
[root@centos7network-scripts]#ls
ifcfg-ens33 ifdown-ppp ifup-ib ifup-Team
ifcfg-lo ifdown-routes ifup-ippp ifup-TeamPort
ifdown ifdown-sit ifup-ipv6 ifup-tunnel
ifdown-bnep ifdown-Team ifup-isdn ifup-wireless
ifdown-eth ifdown-TeamPort ifup-plip init.ipv6-global
ifdown-ib ifdown-tunnel ifup-plusb network-functions
ifdown-ippp ifup ifup-post network-functions-ipv6
ifdown-ipv6 ifup-aliases ifup-ppp
ifdown-isdn ifup-bnep ifup-routes
ifdown-post ifup-eth ifup-sit
[root@centos7network-scripts]#vim ifcfg-ens33
[root@centos7~]#date +‘%F %T‘
2019-07-17 20:53:20
[root@centos7~]#touch /data/`date -d ‘-1 day‘ +%F`.log
[root@centos7~]#ls /data/
2019-07-16.log
[root@centos7~]#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 200G 0 disk
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 100G 0 part /
├─sda3 8:3 0 2G 0 part [SWAP]
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 50G 0 part /data
sr0 11:0 1 10G 0 rom /run/media/root/CentOS 7 x86_64
[root@centos7~]#echo ‘- - -‘> /sys/class/scsi_host/host2/scan
[root@centos7~]#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 200G 0 disk
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 100G 0 part /
├─sda3 8:3 0 2G 0 part [SWAP]
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 50G 0 part /data
sdb 8:16 0 20G 0 disk
sr0 11:0 1 10G 0 rom /run/media/root/CentOS 7 x86_64
bj-yz-k8s-node1-100-10.magedu.com
[root@centos7 dev]#which ls
alias ls=‘ls --color=auto‘
/usr/bin/ls
[root@centos7 dev]#which --skip-alias ls
/usr/bin/ls
[root@centos7 ~]#echo $LANG
en_US.UTF-8
root@centos7 ~]#vim /etc/issue
\S
time is \t
tty is \l
hostname is \n
Kernel \r on an \m
[root@centos7 ~]#shutdown -t 072009552019 ;echo -e ‘\a‘;echo -e ‘\033[43;31;5m‘this computer is halt‘\033[0m‘
Shutdown scheduled for Sat 2019-07-20 09:44:44 CST, use ‘shutdown -c‘ to cancel.
this computer is halt
[root@centos7 ~]#
Broadcast message from root@centos7.6.localdomain (Sat 2019-07-20 09:43:44 CST):
The system is going down for power-off at Sat 2019-07-20 09:44:44 CST!
[root@centos7 ~]#date +‘%F %T‘
2019-07-20 09:50:18
[root@centos7 ~]#date -d ‘-2 day‘ +%A
Thursday
[root@centos7 ~]#date 080706052019.10
Wed Aug 7 06:05:10 CST 2019
[root@centos7 data]#hexdump test.txt
0000000 6261 3163 3332 000a
0000007
[root@centos7 data]#cat test.txt
abc123
建立一个新的会话
[root@centos7 data]#screen -S help
[detached from 8974.help]
查看所有的回话信息
[root@centos7 ~]#screen -ls
There is a screen on:
8974.help (Attached)
1 Socket in /var/run/screen/S-root.
加入第一个终端建立的screen回话
[root@centos7 ~]#screen -x help
标签:vpc top 名称 flush 内核 config kernel nfs which
原文地址:https://blog.51cto.com/14451122/2421941