Linux Installation
I downloaded the VirtualBox 5.2.6 and Ubuntu 17.10.1, feeling that the compatibility of these two versions was not very good, because I saw in the Oracle's official website community that many new versions of the issue were not resolved, and the old version (VirtualBox 5.1.8 and Ubuntu 16.04) Many problems have been solved, which also reflects the lack of professional Linux system support vendors caused by some of the problems of the system itself is not solved in a timely manner, but also reflects a mature system, need a lot of people-- Both the technician and the user work together to maintain and improve.
The problem I'm having
In fact, some of the problems are because they are too stupid, such as not to distinguish between Ubuntu and Oracle company Linux system, in the visualbox wrong led to the optimization part of the installation failure, and so on, I do not list, I believe you will not make the same mistake. Here I mainly cite some of the non-IQ factors I encountered caused by the error:
1. (resolved) Vboxclient open failure error when booting up!
This issue was discussed in Oracle's VirtualBox community, and a similar issue was discussed by them, and someone proposed to reboot after installing GCC, which I tried no more. But I found that when there is no enhancements installed, the system does not have an error, that is, the system is reading the virtual disk (my is vbox_gas_5.2.6) a problem, so I quit the virtual disk (device-and assign optical drive, remove the virtual disk), from the new installation enhancements, The virtual machine becomes only open with Safe mode and cannot enter the desktop. I have no way to reload the virtual machine, choose to download the update when installing, update the Ubuntu system and reboot, install the GCC environment using the "sudo apt-get install build-essential" command (Ps:sudo apt-get BUILD-DEP GCC in my this is not good to make), and then install the enhanced features, very smooth installation after the enhanced features, I restarted the computer, no error, I think it should eventually be the Ubuntu system update cause problem resolution, and forum comments stay seven days ago, I think it should be the default problem has been solved.
2. (Resolved) shared folder/etc/fstab file is not open
In fact, in general, the problem of setting up shared folders in the new version. In fact, in the new version, we installed the enhanced features, and in the VirtualBox terminal set up the shared folder, the desktop will automatically appear a shared folder (the directory is "/media/sf_ shared folder name"), we only need to add the current user to the VBOXSF group, Of course, the old version of the method will still error, according to my humble sighted, there should be a shared folder, resulting in the inability to set up a shared folder, as for the/etc/fstab file use gedit can not open, but use vim to open, I think gedit the software itself problems.
Reference: CSDN blog with sun-filled afternoons
Linux learning one, learning the ingenuity of the Linux command learning method
- Linux architecture, including: application, shell shell, library function, system call, kernel.
- Shortcut key: This is very important. But since there is no programming involved, using ctrl+shift+t and ALT + number n is less, but ctrl+alt+t,Tab, up and down keys , and I was impressed by Ctrl + C and Ctrl+d , and also the most commonly used shortcut keys in the shell.
- Command format in Linux: commands [options] [arguments]. command [options] [parameters]
- Help document man, use printf to view,-K search function,-f view command basic function
- Cheat: Legal cheating device. I use-h to view the help found:-D display cheat installation path,-e to create a new small copy,-l list all available small copy,-s in all available small copy to find,-V display cheat version.
- Other and lookup-related core commands--find, locate, grep, Whereis, and which
- CD to read a directory, the CD directly returns to the root directory, "." Refers to the current directory, "..." Refers to a previous level of directory.
- LS lists all the files in that directory. -a displays all files,-S is sorted by size. -LH Show Details.
- Sudo is probably the most commonly used now, and SU switches to root mode (enter the current user password).
- Gedit is an Ubuntu-brought text editor with detailed explanations of how to use the--help command.
Ii. Learning the basics of Linux Beginners course
Have to say that the virtual environment of the experimental building is very good (so far, although the first time to open the total lag).
Introduction to the first section of Linux systems
- Linux is primarily a system call and a two-tier kernel, and also contains applications on it
- Assembly language, C language, UNIX systems, Minix systems, the history of Linux systems, relationships, and inventors.
- 1984, STALLMAN,GNU Project, FSF Foundation, 1985, gpl;1991, Linux kernel; 1994, Linux1.0.
- Ken Thompson:c The father of language and the Father of Unix, Dennis ritchie:c the father of language and the Father of Unix, Linus Torvalds:linux's father, Stallman: The famous hacker, the GNU founder, developed Emacs, GCC, BA SH Shell.
- Windows can not choose a variety of graphical user interface, not custom tailoring, porting, Linux does not have a specific support vendor and adequate professional software support.
Section II Linux Basic concepts and operations
- Client-side functionality of the desktop environment Kde,gnome,xfce,lxde; The experimental building has been used LXDE and XFCE cooking surface environment.
- Terminal essentially corresponds to the/dev/tty device on Linux, and multi-user login is also through this device. Using [CTRL]+[ALT]+[F1]~[F6] to switch, [F7] to cut back to the graphical interface.
- The Shell has bash, zsh, Ksh, CSH, and so on, the Ubuntu terminal uses bash by default, the default desktop environment is GNOME or Unity, and the lab building uses the ZSH,XFCE.
- Shortcut keys: Ctrl + a move to the wardrobe, ctrl+s pause, ctrl+e to the end of the line, ctrl+k delete all behind; Alt+backspace Delete the previous word.
- Wildcard character: * Match 0 or more characters;? Match any one character, [list] matches any single character in the list, [!list] matches any single character except list unexpectedly, [C1-C2] matches any single character C1 to C2; {string1,string2} matches one of the strings; {C1}. C2} matches all characters from C1 to C2.
- Man command,--help command.
Section III User and file Rights management
- Who command:-a print can print all,-D print dead process,-M and am I,mom likes the same,-Q print the current number of logged in user and user name,-u print the current login user login information,-R print run level.
- su-l [username] Switch User, adduser add new user.
- View the user group, use the Groups command, or view the/etc/group file directly. users need to join the sudo group to gain root privileges .
- Delete User Deluser.
- View the file Permissions ls-l command, which will look at file type permissions.
- chown [Username] [file name] Change file owner.
- chmod change file permissions, binary numeric representation, and add and subtract assignment operations.
Section Fourth Linux directory structure and file basic operation
- FHS Standard, two-tier specification, what file data should be placed in each directory below, and defined for subdirectories of the/USR and/var directories.
- Use the tree to see the purpose of each directory and to understand it in general.
- Use the CD command to switch directories and use them inside Linux. Represents the current directory,.. Represents the previous level of the directory, which represents the last directory, ~ usually represents the home directory of the current user. Use the PWD command to get the current path (absolute path).
- Touch creates a file, MkDir creates an empty directory.
- CP [filename] [Copy to the location],-r-r all files under the copy directory.
- RM [FileName] Delete file,-F Ignore prompt to force delete,-R to delete entire folder.
- MV [source directory file] [destination directory] File move, MV [old filename] [new filename] File rename
- Rename Batch Rename
- Cat positive sequence print file, TAC reverse print file,-n display line number. NL Displays line number printing,-b Specifies how line numbers are added,-n sets the line number position, and the-W line number field occupies the number of digits.
- More one-way paging view files, less two-way paging view files.
- Head view the first n rows of the file, tail view the file after n rows.
- File to view the type of files; Vim edit file.
Section fifth environment variables and file lookup
- Use declare to create variables (letters, numbers, underscores), = Assignment, echo $ to see the value of the variable.
- Use set, env, export (range from largest to small) to view variables in the shell. Export exports a custom variable as an environment variable.
- Temporary variables and permanent variables, permanent variables are stored in important files/ETC/BASHRC and/etc/profile, and they are stored in shell variables and environment variables respectively.
- Add a custom path to the "path" environment variable, modify the. zshrc file, use the echo "content" >>[file name] statement to redirect the content to a file in an append way,> means to redirect the content to a file in a way that overrides it.
Variable modification
- The unset command deletes an environment variable.
- The source command makes the environment variable file effective immediately, and subsequent filenames do not require a full absolute or relative pathname, if "." Instead of source, a complete absolute or relative pathname is required.
Whereis, which, find, locate search for files. Locate-c statistics,-I ignores case lookup, find-atime last access time,-ctime last modified content time,-mtime last modified file attribute time.
Sixth section file packaging and decompression
A variety of packaging and decompression methods.
- Zip Compression Packager,-r means that the recursive package contains all the contents of subdirectories,-Q parameters are expressed as quiet mode,-O for the output file name,-[1-9] represents the size of the compression strength,-X excludes some specific files,-E creates an encrypted compressed package,-L makes Windows compatible.
- Du view file size,-H for people to read,-d [number] to view file depth.
- Unzip unzip the zip file program, the parameters basic and zip the same,-d [directory name] extracted to the specified directory,-l read-only decompression,-o Specify the encoding type.
- RAR Packaging Compression command, a add a directory ~ to an archive file, if the file does not exist, it will be automatically created. d Delete a file from the specified compressed package, l only see the decompression.
- Unrar extract rar file, x full path decompression, e remove path decompression.
Tar packaging tool,-C Create a tar package file,-F [file name] Specifies the file name to create the file,-v Visual output package file,-P reserved Absolute path,-X unpack,-c [Existing path] Specify the unpacking location,-t only look puzzled,-Z to use gzip compressed files (. tar.gz ),-j uses the XZ compressed file (. tar.xz),-j uses the bzip2 compressed file (. tar.bz2).
Section seventh file system operations and Disk Management
- DF command to see the disk capacity,-H people can read the way.
- The/dev/sda2 on the physical host is the partition that corresponds to the host hard disk , and the number below represents the area code , and the letter a in front of the number indicates the first few hard disks (or possibly removable disks), you may also appear if you have multiple hard disks on the host. /DEV/SDB,/DEV/SDC These disk devices will exist as files in the/dev directory.
- Du in addition to the previously mentioned-H,-D,-a displays all file sizes, and-s displays totals only.
- DD creates a virtual image file, if=[the directory where the file is created,],of=[the file name],bs=[the unit size of the file],count=[the total number of unit sizes].
- The MKFS command formats the disk, using Tab to quickly view the file system that can be formatted to form a mkfs. [File System] The command form of [file name].
- Mount command mount disk, basic format mount [options] [source] [directory]. Umount Uninstall, directly mount the location of the file.
- The FDISK command is disk partition,-l view hard disk partition table information, use sudo fdisk [virtual image file] to enter disk partition mode, follow the prompts, enter p to view the results, enter W to write to the partition table.
- All loopback devices in the/dev/loop directory can be viewed with the LS command.
- The KPARTX program is used to establish a mapping of virtual devices for each partition,-av establish mappings, and-DV unmap.
- Losetup [loopback device] [mirroring] establishes an association.
- A loopback device allows a user to virtual a block device with a plain disk file, and the personal understanding is to have a file run as a device.
Section eighth Help commands under Linux
- The main difference between a built-in command and an external command is whether the program exists in the shell. You can use the type to view the command properties, and the result is a shell builtin, which refers to the built-in command, a path to an external command, and alias to the name set by the command alias.
- The help command gets assistance, helps [built-in command]; [external command]--help. Not in zsh, need to cut to bash.
- Man command gets help, man [command],man ls open manual.
- The info command gets help, info [command], and general bash comes with the info command.
- Don't forget the little copy--cheat command.
20165316 preparatory work 3 Linux installation and learning