Doraemon the entry of python centos

# # Chapter XIII centos 

# ## 1.centos installation and describes 

three ways to install the centos:

 - installed directly on the machine
 - dual system
 - installed linux on windows by virtualization software 

virtualization software:

 - VMware
 - VBox
 - mac 

bridge: gets the ip address of the same network segment with your windows machine 

net: do not get with the windows Kiki same network segment ip address 

requirements in the company centos password settings:

 - 12 and above
 - must contain uppercase purple, lowercase letters, numbers, special characters
 - three months or six months to replace 

weak passwords: passwords are easy to guess the 



linux user

 - root user
   - super administrator
   - has permission to fully operate the system
   - misuse of the system damage infinity
   - Do not use the root login
 -Common User
   - operating authority of the system is small
   - the damage is limited
   - requires ordinary user login 



terminal:

 - graphic terminal
 - virtual terminal F1- + Alt + Ctrl F6 
 - physical terminal
 - Equipment Terminal
 - serial terminal
 - pseudo-terminal
 - TTY See terminal 



remote connection tool

 - Xshell
 - PuTTY
 - SecureCRT 



interactive Interface: 

after starting the terminal, opened on a terminal device interfaces

 - the GUI graphics interface
 - the CLI
   - the shell
   - PowerShell 



the shell: 

a linux interface is used on the system, is used to user input is sent to the operating system to perform and put out the resulting output 

view supported by the system CAT shell / etc /shells 

switch the chsh shell - S shell 

view the current running echo $ SHELL shell 



# ## 2. command 

to view the ip address 

`` `Python 
ifconfig to view ip address 
ip addr 
ip A 
` `` 



command prompt: 

`` `Python 
[root @ localhost ~] # 
# - super administrator 
$ normal user 
[user @ hostname directory] command prompt 

adjustment [root @ localhost ~] # font color 
permanent 
echo ' PS1 = "\ [\ E [1; 30; 35m \] [\ @ U \ H \ W is] \\ $ \ [\ E [0m \] " ' >> /etc/profile.d/ ps.sh 
` `` 



Run 

directly enter commands after finishing

 - internal commands

   - after the installation, the system comes with command, is the internal command
  - to get help through the internal command list

 - external command

   - provided by third parties, in some places you can find the executable file directly

   - `` `Python 
    of the type command to view the type of 
    path which find command 
    ` `` 



# ### 2.1 alias alias 

`` `Python 
a; oas listed directly in the system all the aliases 
alias cdetc = ' cd / etc '   set an alias 
unalias cdetc cancel alias 
# make permanent command 
# user user 
[root @ localhost ~] # echo" alias = cdetc 'cd / etc' ">> .bashrc 
# for all users take effect 
echo " Alias cdetc = 'cd / etc' " >>/ etc / bashrc 
`` ` 



execute the original command itself

 -" LS " 
- \ LS
 - ' LS ' 



difference between single and double quotation marks

 - "" You can print variable values directly
 - '' quotes what to write on what print 



date of the command 

`` `Python 
[root @ localhost ~] # date 
Mon CST 29 12:18:14 2019 Jul- 
[the root @ localhost ~] # DATE + F.% 
2019-07-29 
[the root @ localhost ~] # DATE +% H (24 hour) 
12 is 
[the root @ localhost ~] # DATE +% I (12 hour) 
12 is 
[the root @ localhost ~] # DATE Y +% 
. 19
[root@localhost ~]#date +%m
07
[root@localhost ~]#date +%d
29
[root@localhost ~]#date +%M
22
[root@localhost ~]#date +%S
25
[root@localhost ~]#date +%a
Mon
[root@localhost ~]#date +%A
Monday
[root@localhost ~]#date +%T
12:23:31
[root@localhost ~]#date +%y-%m-%d
19-07-29
[root@localhost ~]#%% Y-M- date +% D 
2019-07-29 
UNIX year 
[the root @ localhost ~] # date + time stamp% S 
1,564,374,331 
[the root @ localhost ~] # how many weeks of date +% W year 
30 
`` ` 



set the time zone: ` 

`` Python 
[root @ localhost ~] # timedatectl 
[root @ localhost ~] # timedatectl the sET-timeZone Asia / on Shanghai 
`` ` 



calendar 

` `` Python 
CAL display the current month calendar 
CAL - the y-show year calendar 
CAL -y   #   display # calendar-year 
`` ` 



shutdown restart 

` `` Python 
the shutdown default is off one minute after 
the shutdown   -c cancel 
the shutdown   - r restart 
the shutdown   - now immediately 
reboot reboot 
reboot - the p-power off 
the init 6 reboot 
init 0 shutdown 
poweroff shutdown 
`` ` 



format of the command 

` `` Python 
the Command [Options] [args ..] 
Options: Start or disable a these features 
    short options: - a 
    long option: - All 
parameters: the role of command, in general, is a directory, users, etc. 
Note: 
    need separated by a space between multiple options and parameters and commands 
    Ctrl + c to cancel the command performing 
    a; plurality of spaced commands simultaneously performed 
    using the \ terms of multi-line switching command to 
`

 

Guess you like

Origin www.cnblogs.com/doraemon548542/p/11780260.html