3, Higher order instructions for Linux (very detailed version)

3.1 vi/vim editor and its related instructions

3.1.1 why study VI/VIM

<span style="background-color:#333333"><span style="color:#B8bfc6 "> 1. All Unix like systems come with vi   text editor
2,The editing interface of many applications will actively call vi editor  
3,vim Have the ability of program editing, can actively identify the correctness of grammar by font color, and facilitate program design;
4,Simple operation and fast editing speed.
5,VIM yes VI Upgraded version of
​
​
vi Editor is and windows Notepad, some article editing tools(notepad++,editplus,sublim text)equally</span></span>

3.1.2 mode introduction

Command mode (general mode)

<span style="background-color:#333333"><span style="color:#B8bfc6 "> the user starts Vim/Vi on a file and enters the command mode (also known as general mode). In this state, the keyboard tapping action will be recognized by Vim as a command rather than an input character. For example, if we press i at this time, we will not enter a character. i is regarded as a command. In this mode, you can delete, copy, paste and other behaviors of file content through commands, which can be understood as shortcut key operation</span></span>

Insert mode (edit mode)

<span style="background-color:#333333"><span style="color:#B8bfc6 "> in the command mode, enter i, I, o, O, a, A, r, R and other commands, and you will immediately enter the insertion mode (also known as editing mode). In this mode, we can edit the file in detail, such as using backspace, delete, enter and other text editing keys. Press [ESC] to return to the command mode</span></span>

Bottom line command mode

<span style="background-color:#333333"><span style="color:#B8bfc6 "> in the command mode, enter any of the three characters [:? /] to enter the bottom line command mode. In this mode, we can complete many behaviors, such as searching, reading, archiving, leaving Vim/Vi, etc. Press the [ESC] key to return to the command mode</span></span>

Refer to the following figure:

 

3.1.3 common commands (used in general mode)

<span style="background-color:#333333"><span style="color:#B8bfc6 "> H: move to the beginning of the top line of the current screen  
M: Move to the beginning of the middle line of the current screen  
L:  Moves to the beginning of the bottom line of the current screen  
gg: Move to the first line of this file, equivalent to 1 G (Commonly used)  
G: Move to the last line of this file(Commonly used)
NG: Move the second page of this file N that 's ok
x, X: In one line of characters, x Indicates that a character is deleted backward(amount to del key),X Delete a character for forward(Equivalent to backspace key) (Commonly used)  
nx: n Is a number, which is continuously deleted backward n Characters.  
dd: Delete the row where the cursor is located(Commonly used,Also shear)  
ndd: n Is a number. Deletes the downward position of the cursor n that 's ok(Commonly used)  
d1G:Delete all row data from the cursor to the first row  
dG:Delete all row data from the cursor to the last row 
yy,Y:Copy the row where the cursor is located(Commonly used)  
nyy,nY:n Is a number. Copies the downward position of the cursor n that 's ok(Commonly used)  
p, P:p Indicates that the copied data is pasted to the next row of the row where the cursor is located, P Indicates that the copied data is pasted to the previous row of the row where the cursor is located (Commonly used)  
u:Undo the previous action.(Commonly used)</span></span>

3.1.4 how to enter the insertion mode

<span style="background-color:#333333"><span style="color:#b8bfc6">i/I
    - i  Insert before cursor
    - I  Insert at the beginning of the line where the cursor is located
​
a/A
    - a  Insert after cursor
    - A  Insert at the end of the line where the cursor is located
o/O
    o  Input begins on the next line of the line where the cursor is located
    O  Input begins on the previous line of the line where the cursor is located</span></span>

3.1.5 bottom line command mode

<span style="background-color:#333333"><span style="color:#B8bfc6 "> exit operation:
    :q    Exit without saving, provided nothing is done. Will succeed
    :q!   Forced exit without saving
    :qw   Save and exit
    :qw!  Force save and exit
 Other underlying command operations:
    :set nu    set number 
    :set nonu  Cancel line number display</span></span>

3.2 network configuration of Linux

3.2.1 related concepts of network

<span style="background-color:#333333"><span style="color:#b8bfc6"><span style="color:#8d8df0 "> 1. External network: IP is unique and cannot be repeated. Range: 0.0.0.0 ~ 255.255.255.255</span>
<span style="color:#8d8df0 "> 2. Intranet: reset the IP address through router or switch equipment</ span>
<span style="color:#8d8df0">     Different intranet ip addresses can be the same. A host of Intranet a communicates with its router a through its own network card, and then router a passes through the network center</span>
<span style="color:#8d8df0">     Communicate with router B, and router B communicates with the network card of a machine in the intranet</ span>
<span style="color:#8d8df0">3. IP</span>:<span style="color:#57ac57">     An ip address is a unique identifier that identifies a machine</span>
<span style="color:#8d8df0">4. NETMASK(Subnet mask)</span>:<span style="color:#57ac57 "> used with ip to determine the network segment</span>
<span style="color:#8d8df0">     192.168.1.x        Range: 1-254</span>
<span style="color:#8d8df0">   255.255.0.0  </span>
<span style="color:#8d8df0">     The subnet mask has a position of 1, and the part corresponding to the ip is the network segment. The location corresponding to 0 is the location of the host in the intranet</ span>
<span style="color:#8d8df0 "> 5. Gateway: gateway, which is used to communicate with machines and equipment connected to the external network (router). In other words, the gateway is the IP of the router</span>
<span style="color:#8d8df0">6. DNS</span>:<span style="color:#57ac57 "> domain name resolution server</span>
<span style="color:#8d8df0">   119.75.217.109  www.baidu.com</span>
   
   
   
   
<span style="color:#8d8df0">     IP: IP is the unique identifier of the computer in the network. The IP segment and number are consistent with the router. The subsequent number determines how many computers can be in the intranet, but the initial values and the last values are pre used and cannot be used by ordinary devices</span>
<span style="color:#8d8df0">     Router: the DHCP server in the router is used to assign dynamic IP to devices</span>
<span style="color:#8d8df0">     DNS: another easy to remember name mapping parser for IP</span></span></span>

3.2.2 several network configuration modes of Linux

1) Bridging mode

The IP of the virtual machine in this mode is the same segment as the IP of the physical machine (in other words, the number of machines in the intranet = the number of physical machines + the number of virtual machines)

 

2) NAT mode

The virtual network card used is NetWork Adapter VMnet8, which is used to communicate between the virtual machine and the physical machine. The ip of the virtual machine is assigned by the virtual machine DHCP server in the virtual switch. It can be networked and communicate with all virtual machines connected to the virtual switch. The external network cannot communicate directly with the virtual machine

 

3) Host only mode (ignored)

<span style="background-color:#333333"><span style="color:#B8bfc6 "> the function is to communicate between virtual machines and physical machines</span></span>

3.2.3 network configuration of static IP in bridge mode

Step 1) modify the connection mode of the virtual machine to bridge mode

Step 2) modify the configuration file (/ etc / sysconfig / network scripts / ifcfg ens33)

<span style="background-color:#333333"><span style="color:#b8bfc6">[root@localhost ~]<span style="color:#da924a"># vi /etc/sysconfig/network-scripts/ifcfg-ens33</span>
​
<span style="color:#8d8df0">TYPE</span><span style="color:#b8bfc6">=</span>Ethernet
<span style="color:#8d8df0">BOOTPROTO</span><span style="color:#b8bfc6">=</span>static         <span style="color:#da924a">#The three values dhcp, static and none are optional. dhcp indicates dynamic allocation, and the other two are static</span>
<span style="color:#8d8df0">NAME</span><span style="color:#b8bfc6">=</span>ens33
<span style="color:#8d8df0">DEVICE</span><span style="color:#b8bfc6">=</span>ens33
<span style="color:#8d8df0">ONBOOT</span><span style="color:#b8bfc6">=</span><span style="color:#f3b3f8">yes</span>        <span style="color:#da924a">#Whether the network is automatically connected after startup. yes is automatic and no is manual</span>
<span style="color:#8d8df0">IPADDR</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">10</span>.20.152.200
<span style="color:#8d8df0">NETMASK</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">255</span>.255.255.0
<span style="color:#8d8df0">GATEWAY</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">10</span>.20.152.1           <span style="color:#da924a"># This word is especially easy to make mistakes</span>
<span style="color:#8d8df0">DNS1</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">10</span>.20.152.1
<span style="color:#8d8df0">DNS2</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">8</span>.8.8.8
<span style="color:#8d8df0">DNS3</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">114</span>.114.114.114</span></span>

Step 3) restart the network service item

<span style="background-color:#333333"><span style="color:#b8bfc6">[root@localhost ~]<span style="color:#da924a"># systemctl restart network</span></span></span>

Step 4) check the ip address

<span style="background-color:#333333"><span style="color:#b8bfc6">[root@localhost ~]<span style="color:#da924a"># ip addr</span></span></span>

Step 5) check whether the network is unblocked

<span style="background-color:#333333"><span style="color:#b8bfc6"><span style="color:#64ab8f "> 1 < / span >. Whether it is unobstructed with the Internet: Ping www.baidu.com       
   Send a connection request to Baidu server. If the connection is successful, baidu server will send 64 bytes to the machine
<span style="color:#64ab8f "> 2 < / span >. Is it unobstructed with the physical machine:
      <span style="color:#7575e4">--</span> virtual machine ping Physical machine    <span style="color:#F3b3f8 "> Ping < / span > ip address of physical machine
      <span style="color:#7575e4">--</span> Physical machine ping virtual machine    <span style="color:#F3b3f8 "> Ping < / span > IP address of virtual machine</span></span>

3.2.4 network configuration of static IP in NAT mode

Step 1) modify the connection mode of the virtual machine to NAT mode

Step 2) view and modify the virtual information of VMNet8

<span style="background-color:#333333"><span style="color:#B8bfc6 "> VMware Edit menu -- > virtual network editor -- > change settings -- > select VMnet8 and modify the subnet IP segment to 192.168.10.0
-->Click Apply-->click NAT Set and view relevant information, such as
 Subnet IP,Subnet mask, gateway</span></span>

Step 3) modify the configuration file

<span style="background-color:#333333"><span style="color:#b8bfc6">[root@localhost ~]<span style="color:#da924a"># vi /etc/sysconfig/network-scripts/ifcfg-ens33</span>
​
<span style="color:#8d8df0">TYPE</span><span style="color:#b8bfc6">=</span>Ethernet
<span style="color:#8d8df0">BOOTPROTO</span><span style="color:#b8bfc6">=</span>static         <span style="color:#da924a">#The three values dhcp, static and none are optional. dhcp indicates dynamic allocation, and the other two are static</span>
<span style="color:#8d8df0">NAME</span><span style="color:#b8bfc6">=</span>ens33
<span style="color:#8d8df0">DEVICE</span><span style="color:#b8bfc6">=</span>ens33
<span style="color:#8d8df0">ONBOOT</span><span style="color:#b8bfc6">=</span><span style="color:#f3b3f8">yes</span>        <span style="color:#da924a">#Whether the network is automatically connected after startup. yes is automatic and no is manual</span>
<span style="color:#8d8df0">IPADDR</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">192</span>.168.10.101
<span style="color:#8d8df0">NETMASK</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">255</span>.255.255.0
<span style="color:#8d8df0">GATEWAY</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">192</span>.168.10.2        <span style="color:#da924a"># This word is especially easy to make mistakes</span>
<span style="color:#8d8df0">DNS1</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">192</span>.168.10.2
<span style="color:#8d8df0">DNS2</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">8</span>.8.8.8
<span style="color:#8d8df0">DNS3</span><span style="color:#b8bfc6">=</span><span style="color:#64ab8f">114</span>.114.114.114</span></span>

Step 4) restart the network service item

<span style="background-color:#333333"><span style="color:#b8bfc6">[root@localhost ~]<span style="color:#da924a"># systemctl restart network</span></span></span>

Step 5) check the ip address

<span style="background-color:#333333"><span style="color:#b8bfc6">[root@localhost ~]<span style="color:#da924a"># ip addr</span></span></span>

Step 6) check whether the network is unblocked

<span style="background-color:#333333"><span style="color:#b8bfc6"><span style="color:#64ab8f "> 1 < / span >. Whether it is unobstructed with the Internet: Ping www.baidu.com       
   Send a connection request to Baidu server. If the connection is successful, baidu server will send 64 bytes to the machine
<span style="color:#64ab8f "> 2 < / span >. Is it unobstructed with the physical machine:
      <span style="color:#7575e4">--</span> virtual machine ping Physical machine    <span style="color:#F3b3f8 "> Ping < / span > ip address of physical machine
      <span style="color:#7575e4">--</span> Physical machine ping virtual machine    <span style="color:#F3b3f8 "> Ping < / span > ip address of virtual machine  </ span></span>

3.3 application of remote connection tools

Because the Linux system is usually used for servers, there is no desktop environment, only DOS interface, and sometimes the software on the server is broken, or due to permission problems, it can not directly operate the server. Instead, it operates remotely, such as the administrator authorizes ordinary workers to connect to the server, or the administrator is at home and connects the company's server with his home computer Therefore, there are many software tools on the market that can remotely connect to the server, such as Xshell, FinallShell, CRT, putty, MobaXterm, etc

Here, choose to use MobaXterm. The version is optional: MobaXterm_Installer_v10.9.zip. Double click to install.

 

Tip: you can set the theme in setting, right-click to paste, etc

3.4 other network settings

3.4.1 closing of firewall

<span style="background-color:#333333"><span style="color:#b8bfc6">systemctl status firewalld    #View firewall status
systemctl stop firewalld    #Temporarily turn off the firewall
systemctl start firewalld   #Temporarily turn on the firewall
systemctl disabled firewalld   #Set startup not to automatically start firewall
systemctl enable firewalld   #Set the firewall to start automatically after startup
​
​
Tip: in clusters linux,The firewall is usually turned off</span></span>

3.4.2 shutdown of NetworkManager

<span style="background-color:#333333"><span style="color:#b8bfc6">systemctl status NetworkManager   
systemctl stop firewalld    
systemctl start firewalld  
systemctl disabled firewalld   
systemctl enable firewalld  
​
Tip: in clusters linux,Usually closed NetworkManager of</span></span>

3.4.3 netstat instruction

<span style="background-color:#333333"><span style="color:#B8bfc6 "> note: this instruction is in the net tools installation package and needs to be installed. yum -y install net-tools</span></span>
<span style="background-color:#333333"><span style="color:#B8bfc6 "> English: network statistics command path: / bin/netstat execution permission: all users
 Function: mainly used to detect the network configuration and status of the host
​
-a (all)Show all connection and listening ports
-t  (tcp)Show only tcp Related options
-u (udp)Show only udp Related options
-n Displays the address and port number numerically
-p display socket of PID And the name of the process
-l  (listening)Displays the name of the server under monitoring socket
​
Case presentation:
eg: netstat -tlnu      View native listening(In use)Port
eg: netstat -nltp      View native listening(In use)Ports and PID and Name information
eg: netstat -ntlp | grep tcp6    View the port information of a program
eg: netstat -atnp | grep 25   View port</span></span>

3.4.4 modification of host name and mapping file

1) Modification of host name

<span style="background-color:#333333"><span style="color:#B8bfc6 "> method 1: directly modify the configuration file / etc/hostname
[root@localhost ~]<span style="color:#da924a"># vi  /etc/hostname</span>
​
Mode 2: use hostnamectl instructions
[root@localhost ~]<span style="color:#da924a"># hostnamectl set-hostname qianfeng01</span>
​
Viewing host names
[root@localhost ~]<span style="color:#da924a"># hostname</span>
​
If you want to update the host name of the current session, either restart or enter the subroutine(direct bash instructions)</span></span>

2) Modification of mapping file

Location of domain name mapping file / etc/hosts

<span style="background-color:#333333"><span style="color:#b8bfc6">[root@qianfeng01 ~]<span style="color:#da924a"># vi  /etc/hosts</span>
<span style="color:#64ab8f">127</span>.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
<span style="color:#64ab8f">192</span>.168.10.101 qianfeng01 qianfeng001
<span style="color:#64ab8f">192</span>.168.10.102 qianfeng02
<span style="color:#64ab8f">192</span>.168.10.103 qianfeng03
<span style="color:#64ab8f">192</span>.168.10.104 qianfeng04
<span style="color:#64ab8f">192</span>.168.10.105 qianfeng05
​
Note: write first ip,Writing domain name string
​
<span style="color:#F3b3f8 "> ping < / span > command will access the / etc/hosts file first. If the domain name after ping is found, the ip address corresponding to the domain name will be used to send a request to the machine where the ip address is located</span></span>

3.5 common process management commands

3.5.1 ps

<span style="background-color:#333333"><span style="color:#B8bfc6 "> function: view the process information in the system
 Syntax: ps [-auxle]
Common options
​
a: Show processes for all users
u: Displays the user name and start time
x: Displays processes without control terminals
e: Displays all processes, including those without control terminals
l: Long format display
​
eg:
    ps -aux  
    ps -aux | grep java</span></span>

3.5.2 pstree (required to install: yum -y install psmisc)

<span style="background-color:#333333"><span style="color:#B8bfc6 "> function: view the current process tree
​
Syntax: pstree [option]
-p  Display process PID
-u  Displays the user to which the process belongs
​
eg:  pstree -p</span></span>

3.5.3 kill

<span style="background-color:#333333"><span style="color:#B8bfc6 "> function: kill the process
 Syntax:  kill -9 pid.....
​
eg:   kill -9  1514  1548</span></span>

3.5.3 nohup

<span style="background-color:#333333"><span style="color:#B8bfc6 "> function: set the foreground process to the background process, which needs to cooperate with the & symbol to liberate the current window
​
eg:  nohup ping www.baidu.com > ping.txt &</span></span>

3.6 commands related to users and user groups

3.6.1 introduction

<span style="background-color:#333333"><span style="color:#B8bfc6 "> to log in to the Linux system, you must have an account and password. Otherwise, how do you log in, right. We also know that Linux is a multi-user operating system; So, should different users have different permissions? Otherwise, what's the point.
​
Linux System use user and group Two concepts are used to limit some permissions. Of course, the management of these permissions is still a super administrator root To do it.</span></span>

Note: because the management of the whole system is root, you should be careful when using root. If you can't use it, try not to use it.

User is the account to log in to the Linux system. In fact, this account is just for people's memory. Each account corresponds to a unique UID digital identifier, which is stored in the / etc/passwd file. Therefore, when we log in, Linux actually uses a UID to identify whether this user exists.

Group. Due to the reference of multi-user concept, Linux also refers to the concept of user group in order to facilitate user management. Linux system can have multiple user groups, and each user group also has its own GID digital unique identifier.

<span style="background-color:#333333"><span style="color:#B8bfc6 "> 1. Relationship between users and user groups
    - A user can belong to multiple user groups(Primary and additional user groups)
    - There can be multiple users under a user group
​
2. Take a real-life example
    user A,B,C It is the project team of the company's development department M A member of is developing a JAVA project
    user D,E,F It is the project team of the company's development department N A member of is developing a C Language project
    Project team N Due to the rush to complete the development,To project team M Borrowed a user A(A Cow break, will java,Also c)
    So the cow broke it A Be in the project team every morning M Middle development JAVA Project, in the afternoon in the project team N Middle development c Project. Night......Work overtime</span></span>

3.6.2 User management (/ etc/passwd,/etc/shadow)

1)useradd

<span style="background-color:#333333"><span style="color:#B8bfc6 "> syntax format: useradd    [options]    [user name]
Common options:
  <span style="color:#7575e4 "> - C < / span > comment specifies an annotative description.
  <span style="color:#7575e4 "> - d < / span > directory specifies the user's home directory. If this directory does not exist, you can create a home directory by using the - m option at the same time.
  <span style="color:#7575e4 "> -g < / span > User Group specifies the user group to which the user belongs.
  <span style="color:#7575e4 "> - G < / span > user group, which specifies the additional group to which the user belongs.
  <span style="color:#7575e4 "> - s < / span > Shell file specifies the login Shell of the user.
  <span style="color:#7575e4 "> - U < / span > User ID number specifies the UID of the user
  
eg:
[root@qianfeng01 home]<span style="color:#da924a">#  useradd  -c 'this is a new user' -g 0 -G 1 -u 1001 -s /bin/bash  michael</span>
​
​
[root@qianfeng01 home]<span style="color:#da924a">#  useradd  -d /home/scott1 -c 'this is a new user' -g 0 -G 1 -u 1002 -s /bin/bash  scott</span>
​
​
​
Tip: location and name of ordinary users' home       /home/user name/</span></span>

2)passwd

<span style="background-color:#333333"><span style="color:#B8bfc6 "> syntax format: passwd [options] [user name]
Common options:
    -l Lock the password, that is, disable the account.
    -u Password unlock.
    -d Make the account no password.
    -f Force the user to change the password at the next login.
​
eg:   passwd   michael</span></span>

Note: when the user account was first created, there was no password, and the account was locked by the system and cannot be used. This account can only be used after we specified a password for the account. The command to set the password is passwd. Super users can set passwords for themselves and ordinary users, and ordinary users can only modify their own passwords.

3)su

<span style="background-color:#333333"><span style="color:#B8bfc6 "> syntax: su [user name]
Function: switch user accounts
​
eg:
    su michael    Switch to michael identity
    su            Switch to root identity
    su root       Switch to root identity</span></span>

4)usermod

<span style="background-color:#333333"><span style="color:#B8bfc6 "> syntax format: usermod [options] [user name]
Common options and useradd The options in the command are the same-c, -d, -m, -g, -G, -s, -u Use these parameters to specify new values for the user.
In addition, you can use -l Option to modify the user name (suggestion: if you modify the user name, you'd better modify the home directory together).
​
The format is as follows:   If you change the user name, you'd better bring it with you-m Parameter, and modify the home directory at the same time
usermod  -l  newName  -d /home/newName  -m oldName
​
Case 1:# usermod -s /bin/ksh -d /home/ls –g adm lisi
 This command will the user lisi Login for Shell Change to ksh,Home directory changed to/home/ls,User group changed to adm
 Case 2:
     usermod -m michael -l michael1  -d /home/michael1</span></span>

5)userdel

The system administrator can delete the user account from the system. When deleting, the user record in / etc/passwd,/etc/shadow,/etc/group and other related system files will be deleted at the same time. Sometimes, it may be necessary to delete the user's related home directory.

<span style="background-color:#333333"><span style="color:#B8bfc6 "> syntax format: userdel [options] [user name]
Common options are -r,Its function is to delete the user's home directory together.
​
If not added-r. have access to useradd -g Specify original group -u Specify original uid Value user name, add it back and delete it again</span></span>

3.6.3 Group management (/ etc/group)

Linux plans multiple users in the system into different user groups, so that the system can uniformly manage multiple users by managing user groups. By default, when creating a user, the system will create a user group with the same name, and then divide the user into this user group.

The separate management of user groups is actually the management of / etc/group system files. The operations involved include: addition, deletion and modification.

1)groupadd

<span style="background-color:#333333"><span style="color:#B8bfc6 "> the syntax format is as follows: groupadd [options] [user group]
Common options are:
       -g   Specifies the group identification number for the new user group( gid). 
       -o  General and-g Options are used together to represent the name of the new user group gid You can connect with existing user groups in the system gid Same.</span></span>
<span style="background-color:#333333"><span style="color:#b8bfc6">Example 1:# groupadd grp1
//Add a new group grp1 in the system. The gid of the new group is automatically + 1 based on the current maximum group ID.
 
Example 2:# groupadd -g 600 grp2
//A new group grp2 is added to the system, and the group ID number of the new group is 600</span></span>

2)groupmod

<span style="background-color:#333333"><span style="color:#B8bfc6 "> syntax format: groupmod [options] [user group]
Common options are:
        -g Specify a new group ID for the user group.
        -o And-g Options are used together with the new user group gid You can connect with existing user groups in the system gid Same.
        -n  Change the name of the user group to a new name
​
Example 1: # groupmod -g 601 grp1
  // Change the group identification number of user group grp1 to 601.
​
Example 2: # groupmod –g 10000 -n grp2 grp1
  // Change the identification number of user group grp1 to 10000 and the group name to grp2</span></span>

3)groupdel

<span style="background-color:#333333"><span style="color:#B8bfc6 "> syntax format: groupdel    [user group]
​
Case 1:# groupdel grp1
//Delete the user group grp1 from the system</span></span>

Tags: Linux CentOS vim Vmware

Posted on Tue, 30 Nov 2021 07:38:50 -0500 by stueee