Home > OS >  Linux directory infrastructure
Linux directory infrastructure

Time:10-04

A freshman
Summer camp for
Sue embedded study on July 22, 2019,
Come on. ?? _???? )? Gao

The structure of the Linux directory:
1,/: the root directory, only directory, are stored in the column as/sbin,/bin,/usr,
2, bin (binary) : binary, depositing executable file, commonly used basic commands (such as ls),
3, the dev (device) : storage device files (such as u disk),
4, lib: storing library file (column, such as the printf function),
5, root, the root user's home directory,
6, sys proc: save your kernel information,
7, etc: save the system configuration files,
8, var: save a log file,
9, home: ordinary users home directory,
10 and sbin (super sbin) : storage level higher command, (columns such as ifconfig, etc.), in this directory command, only the administrator can use,
11, usr: for users to install software,
12, the boot: deposit startup files,
13, MNT: mounted directory,
Linux hotkey:
CTRL + c: interrupt the current task,
Tab: automatic completion,
Commonly used Linux command: (all command followed by a space,)
1, CD: change the working directory,
CD + path (absolute path and the relative path)
An absolute path: starting from the root directory to/start recursive form the path,
Relative paths: relative to the current path,
Some forms of CD:
CD... : return to the higher level directory,
CD. : enter the current directory,
CD - : return to the previous work path,
CD ~ : return to the home directory,
CD/: into the root directory,
2, ls: display file,
Some forms of ls:
Ls -a: display all of the files to. At the beginning of the file is generally not show that only when the ls -a can, according to
Ls -l: display attributes of files and permissions,
3, the PWD: display path,
The PWD + file name: can show the path of the file is located,
4, the mkdir: create the directory,
The mkdir + directory name: create the directory,
5, the cat: displays the contents of a file,
The cat + file name: can displays the contents of a file,
6, rm - rf: delete,
Rm - rf + file name: delete files,
7, the cp (copy) : copy,
Cp + + source path to path: copies files from the source path to goal path (path can be relative or absolute path)
Cp + r (f) + + source path path: the folders in the form of recursive path from the source path is copied to the purpose, can use relative or absolute path (path), (f) can add don't add said enforcement,
8, mv: move files or rename files,
Path of mv + source + purpose: move the file from the source path shear path to purpose, (path can be relative or absolute path)
Mv name + space + old + new name: rename,
9, useradd + user name: in the home directory to create a new user,
10 and passwd: set the password (password)
Passwd + user name: set the user's password, if the passwd does not add any user name, the default modification is the root password,
11, su + user name: implementation is to switch the user, enter other ordinary users don't need a password from the root, if from ordinary users enter root requires the root password, password is needed to switch between ordinary users, su behind do not add any user name, the default entry is the root user,
12, cat/etc/passwd: the user can view himself had built up,
13, userdel: delete users but not delete home directory, you can use the rm - rf + user name delete home directory,
Userdel + r: delete users delete home directory at the same time,
  • Related