One, Linux installation
- The installation process follows the steps in the teacher's blog, followed by the following questions.
- The virtual machine system version can only install 32-bit systems
Baidu found a solution, to the BIOS to turn on the CPU virtualization.
Second, the Linux command to learn 1. Ingenious Linux Command learning methods to master the shortcut keys
- Ctrl+alt+t: Open the terminal, use the terminal every day, with the mouse to open too low efficiency;
- Ctrl+shift+t: New tab, important application when programming;
- ALT + number n: Switch to nth tab in terminal, with important application in programming;
- TAB: Command completion in the terminal, when you enter the beginning of a command part, press the TAB key can be prompted or help to complete;
- Up and down keyboard: Switch command history, just enter a very long command, press the key can be restored;
CTRL + C: interrupts the program to run.
The command format for Linux is:
- command [options] [arguments]//brackets are optional, that is, some commands do not require options and do not require parameters
- Man command: Help documentation
Cheat Command: Provides a display of Linux command use cases, including all of the options and short but understandable features of the command.
2.Linux Basic Introductory Course first sectionThis article mainly introduces the history of Linux, the difference between Linux and Windows, and other introductory knowledge.
Section IIThe content and ingenuity of the Linux command learning method are roughly the same, and simply learn and complete the job.
Section III
- View User
$ Who am I
Or
$ who mom likes
- Create user
su-l [username] Switch User, adduser add new user.
- Root permission is the highest privilege
- User groups
Use the Groups command or view the/etc/group file to see which user group you are in.
File permissions
View file permissions ls, change file owner sudo chown [new user] [filename];
Modify file permissions: Binary numbers represent or add or subtract assignment operations.
Fourth quarter
*.zip:zip Program Packaging Compressed files
*.rar:rar Program Compressed Files
*.7z:7zip Program Compressed Files
*.tar:tar program packaging, uncompressed files
*.gz:gzip Program (GNU Zip) compressed files
*.XZ:XZ Program Compressed Files
*.BZ2:BZIP2 Program Compressed Files
*.tar.gz:tar package, gzip program compressed files
*.tar.xz:tar Packaging, XZ program compressed files
*tar.bz2:tar Packaging, BZIP2 program compressed files
*.tar.7z:tar Packaging, 7z program compressed files
-R: Indicates that the recursive package contains the entire contents of subdirectories
-Q: Expressed as Quiet mode
-O: Indicates the output file, followed by packaging the output filename immediately thereafter
-O: You can specify the encoding type Unzip-o GBK Chinese compressed file when extracting. zip
Du: View the default compression level, the lowest, the maximum compression level, and the size of the uncompressed files, respectively
-x: Excludes the zip file we created last time, otherwise it will be packaged in a compressed file.
-E: Create an encrypted compression package
-L: Convert LF to CR+LF
- Zip compression wrapper:
Package: Zip package output file name. zip-Packaged Directory (directory please add-r parameter)
- Zip decompression
Unpacking: Unzip Something.zip (unzip Sth. To the current directory)
- RAR Packaging Compression Command
- To delete a file from the specified compressed package file
- View unresolved files
- Extracting RAR files using Unrar
- Tar Packaging tools
Package: TAR-ZCVF Something.tar Something
Unpacking: TAR-ZXVF Something.tar
*.tar.gz:-Z
*.TAR.XZ:-j
*TAR.BZ2:-j
Seventh Quarter
- To view disk and directory capacity
To view disk capacity using the DF command
$ DF or $ df-h
To view the capacity of a directory using the du command
$ du or du-h
The-d parameter specifies the depth of the view directory
View information for Level 1 directories only
$ du-h-D 0 ~
View Level 2
$ du-h-D 1 ~
Du-h #同--human-readable to improve the readability of information by K,m,g.
Du-a #同--all Displays the size of all files in the directory.
Du-s #同--summarize only displays totals, listing only the last added value.
To create a virtual image file using the DD command
Create an empty file with a capacity of 256M from the/dev/zero device
$ dd If=/dev/zero of=virtual.img bs=1m count=256
$ du-h virtual.img
Format a disk with the MKFS command
$ sudo mkfs.ext4 virtual.img
Mount a disk to a directory tree using the Mount command
mount [Options] [source] [directory]
Common operations: Mount [-o [Operation Options]] [-t file system type] [-w|--rw|--ro] [File system source] [Mount Point]
Eighth Quarter
- The help command gets assistance, helps [built-in command]; [external command]--help. Cut to bash.
- Man LS Open the manual.
20165307 preparatory work 3 Linux installation and learning