All commands in the history output operation
Ctrl+p the output History command to scroll up.
The CTRL + N output History command scrolls down.
CTRL+B cursor Shift Left
CTRL+F Cursor Right Shift
CTRL + A cursor moves to the beginning
Ctrl+e cursor moves to end of line
Ctrl+l Clear Screen
Tab Smart Tips
Tab press two consecutive times to list all the commands or all subdirectories in that directory
/bin commonly used commands, such as date, LS, CAT,CP, etc.
/boot needs something to boot.
/dev Device Directory
/etc configuration files required for system management
Home directory for all users
/lib stores the most basic dynamic shared library of Linux systems, and it works with DDL files in Windows, and almost all applications need these shared libraries
/media system If you can automatically mount the U-disk, optical drive and other things, right here. Content inside is the content of the U disk
/mnt yourself mount a USB stick etc in this
/sbin commands inside the admin
/usr (user software Resource) Users software resource directory, current user's program or file
. Current directory
.. Top level directory for current directory
cd– Switch between adjacent two directories
Pwd writes out the current absolute path directory
$ normal User
#超级用户
Sudo Apt-get Install aptitude
Sudo Apt-get Install VSFTPD
Sudo Apt-get Install Lftp
Sudo Apt-get Install Openssh-server
Sudo Apt-get Install Nfs-kernel-server
Sudo apt-get Install rar
Sudo Apt-get Install tree
Sudo Apt-get Install Vim
Use of Linux commands
1. View Catalog
Ls
Ls–a (All) to view all files in the current directory. Front with "." Description is a hidden file or directory
LS–L lists the details of an explicit file.
File type
-Normal file, D directory (must be 4096), L link symbol, B-block device, C-character device, s socket socket file, P-pipe
File Type |x,x,x (owner's permissions rwx, none-) |x,x,x (same group user rights) |x,x,x (Other people Rights) | Number of hard connections for X Files | Owner | Groups to belong to | Occupy Space | Modification Time | File name
Tree, you need to add the tree software, installed in the form of sudo apt-get install tree.
White-Plain file, blue-directory, green-executable, red-zip file, cyan-Link file (shortcut), yellow-device file, gray-other file.
Mkdir name to create a directory named name
Mkdir dir/dir1/dir2–p Note that you need to add a-p to create a nested directory
Rmdir Delete Empty Directory
Rm deletes directories and all of the following files and low-level directories
Specific usage rm aa–r Recursive delete directory, directly with RM AA will error
Rm Aa–ri will be consulted in turn to see if it needs to be deleted.
You do not need to add-r when deleting files,
Touch name, if the file does not exist, creates the file and, if the file exists, only modifies the file's creation time (last modified time)
Cp Copy file or directory
Cp hello.c Temp If the temp file exists, the original content is overwritten and the file is created automatically if it does not exist.
Cp mytest Newdir–r Recursive assignment, if the directory does not exist, it will create a newdir directory, and then put the other things in, if the directory already exists, it will create a subdirectory called MyTest in the directory
Q: What happens if the mytest is present in this directory?
Cat name View the contents of the name file, to view the contents of the small file, the file is too big may not show the full
More name view the contents of the file, display part, enter the next line, the space bar next page
Less name to page
The main use of the VI name to query the contents of the file.
Head–x name view Top x line contents
Tail name to see what's behind, default 10 rows
Mv oldname newname Change the name of the file
Mv filename dir Moves the file to the Dir directory
Ln–s filename NewName Creates a link file named NewName to the file. However, this link file cannot be used when it is not under this relative path
Ln–s ~/1DAY/HELLO.C Hello.soft This creates a linked file, you can continue to use it even if the hello,soft is moved elsewhere. The absolute path must be used when the path is written.
.. /go to the top level directory
Hard Links
Need to further query the similarities and differences between hard links and soft joins
Wc output the number of lines, words, and bytes of the file
Od
The./hello executes the binaries directly, the files in the current directory
Du-h viewing the size of low-level directories in the current directory
Which LS--"/bin/ls command parser looks for this command in this directory
Linux Basics Learning Essay