Some basic introduction about Linux

Various versions of Linux:
1. Centos (free version, acquired by Redhat)
2. RHEL (enterprise paid version)
3. Ubuntu (Linux distribution based on Debian)
Reference link: https://blog.csdn.net/lixingshi /article/details/60890593
ubuntu reference link: https://blog.csdn.net/songfulu/article/details/85310273

VM creates a minimal installation system of Centos8.2 version

Direct typical installation is also possible, cpu: 2 cores, memory: 1G, hard disk: 20G, enough for
Insert picture description hereInsert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Generally the default 20G is enough
Insert picture description here
Insert picture description here
Insert picture description here
new installation to create an ordinary user example:
Insert picture description here
the time can be displayed when the hisroty command is executed:
HISTTIMEFORMAT="%F %T "
Permanent effect:
add under the .bash_profile file Export variables, press: wq! Save and exit
vi ~/.bash_profile
export HISTTIMEFORMAT="%F %T "
Use source or. to validate the configuration file
Insert picture description here

Linux philosophy:
1. Everything is a file (including hardware)
2. A small, single-purpose program
3. A link program to complete complex tasks together
4. Avoid confusing user interfaces
5. Configuration data is stored in text

Linux commonly used commands
echo command can output the following characters.
Function: display characters, echo will send the input string to standard output. The output strings are separated by blank characters, and a
newline number is added at the end .
Syntax:
Options:
-E (default) does not support \ interpretation function
-n does not automatically wrap
-e enables \ character interpretation function
Display variables
enable command options -e, if the following characters appear in the string, they will be treated specially, and they will not be output as normal text.
\a A warning sound
\b Backspace key
\c No line break
\e escape at the end, equivalent to \ 033
\n Line feed and the cursor moves to the beginning of the line
\r Carriage return, that is, the cursor moves to the beginning of the line, but does not wrap the line
\t Insert tab
\ Insert\Character
\0nnn Insert the ASCII character represented by nnn (octal)
\xHH Insert HH( ASCII number represented by hexadecimal (man 7 ascii)

Common usage of screen command:

Create a new screen session
screen -S [SESSION]
join the screen session
screen -x [SESSION]
exit and close the screen session
exit
strip the current screen session
Ctrl+a,d
display all the open screen sessions
screen -ls
restore a screen session
screen- r [SESSION]

ifconfig
yum install -y net-tools

date
[root@centos8 data ]#date +"%Y-%m-%d %H:%M:%S"
2020-09-30 19:59:40
[root@centos8 data ]#date +"%F %T"
2020-09-30 19:59:45
显示昨天
[root@centos8 data ]#date -d ‘-1 day’ +"%F %T"
2020-09-29 20:03:18

Guess you like

Origin blog.csdn.net/weixin_50904580/article/details/108889197