This chapter records how command commands are downloaded on Linux endpoints, analog terminals, DKPG management packages, user groups and user management, file properties, file and directory management, and view disk usage.
(1) Command download path:
Wegt path;
(2) Analog Terminal:
From Ctrl+alt+f1 (F2 ... F7) A total of 7 analog terminals, of which the 7th analog terminal is a desktop environment.
(3) DKPG Software Management Pack:
Basic commands for DKPG:
To View the DPKG program version number :
Dpkg--version
Install dpkg:
sudo dpkg--install software package (there are three formats: respectively. DEB,.RPM,.TAR.XZ,)
Delete dpkg:
sudo dpkg--remove
View dpkg:
sudo dpkg--list
(4) User group and user management:
<1> User group:
To view all user groups:
Cat/etc/group
The General user Group ID is more than 1000 , and the ID is 3 digits below the system or system software user group.
User group format:
root:x:0:
User group name: User group password (encrypted): User group ID:
To add a user group:
sudo groupadd user group name
To modify a user group:
sudo groupmod-n new user group name original user group name
To delete a user group:
sudo groupdel user group name
If the primary user group for a user is the currently deleted user group , the deletion fails to delete the user before the user group can be deleted.
If you delete a user group with ID 1001 , When you add another user group , its ID may also be 1001, and will not be the same as the database ID , not the main conflict , ID can be reused.
<2> Users:
A user group can have more than one user group, but one user has only one primary user group. The remaining user groups are additional user groups.
View all user information:
cat/etc/passwd
User format:
Root:x:0:0:root:/root:/bin/bash
User name: User password (encryption): User ID: User Group ID: Description Information: User's home directory specify: Specify the user's SH
Add Users:
sudo useradd-g user group name-m user name (-G specified user group,-m create user's home directory)
To modify a user:
sudo usermod-l new user name original user name (-l specify new user name)
To modify a user's user group:
sudo usermod-g user group name User name (-G specified user group)
To modify a user password:
sudo passwd user name
If you have sudo permissions, you can reset the password without entering the old password, ignoring the restrictions.
To modify the current user password:
Passwod
To delete a user:
sudo userdel user name
(5) file properties:
File properties:
-RWX------
0123456789
0 for the file type, 123 for the owning user, 456 for the group, and 789 for other users
R: Represents a readable
W: Represents writable
Z: Represents the executable
File type: the
D: Representative Directory
-: Representative file
L: Represents a linked document (link file)
B: An interface device that represents a storage device in the installation file
C: Device file serial port device, such as keyboard, mouse.
To modify the owning user group for a file:
sudo chgrp user group name file name
To modify the file's owning User:
sudo chown user name file name
Open File:
Mousepad file name
There are two ways to modify permissions for a file:
<1>sudo chmod xyz file or directory
XYZ is the corresponding permission system (calculated: R=4,w=2,x=1) If the x=7, on behalfof the user- readable writable executable; 0 means unreadable and non-writable.
<2>sudo chmod u-x,g+w,o+r file or directory
chmod u (user) + (join) r file or directory
G (Group)-(remove) W
O (Other) = (set) x
A (All)
(6) File and directory management:
LS: List directory
CD: Switch directories
PWD: Displays the current directory
mkdir: Create a new directory
RmDir: Delete an empty directory
CP: Copying Files or directories
RM: Remove files or directories
Rm-r: Language-out file or directory (recursively removes all contents of the directory)
Rm-f: Remove files or directories (recursively remove all of the directories, some important files will prompt)
MV: Cut the file or directory (there is another feature, that is, change the name: Move the original file or the original directory name of a new file or a new directory name)
(7) View disk usage:
DF: Outputs all current disks in kilobytes (KB)
Df-h: Outputs all current disks (in gigabytes)
du: Recursively output the size of the files in the current directory (in kilobytes)
Du-h: Recursively output the size (in gigabytes) of the files in the current directory
Basic Debian Learning commands under VMware Workstation (ii)