20165316 preparatory work 3 Linux installation and learning

Source: Internet
Author: User
Tags extract rar file rar file permissions virtual environment

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
    1. Linux architecture, including: application, shell shell, library function, system call, kernel.
    2. 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.
    3. Command format in Linux: commands [options] [arguments]. command [options] [parameters]
    4. Help document man, use printf to view,-K search function,-f view command basic function
    5. 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.
    6. Other and lookup-related core commands--find, locate, grep, Whereis, and which
    7. 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.
    8. LS lists all the files in that directory. -a displays all files,-S is sorted by size. -LH Show Details.
    9. Sudo is probably the most commonly used now, and SU switches to root mode (enter the current user password).
    10. 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
    1. Linux is primarily a system call and a two-tier kernel, and also contains applications on it
    2. Assembly language, C language, UNIX systems, Minix systems, the history of Linux systems, relationships, and inventors.
    3. 1984, STALLMAN,GNU Project, FSF Foundation, 1985, gpl;1991, Linux kernel; 1994, Linux1.0.
    4. 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.
    5. 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
    1. Client-side functionality of the desktop environment Kde,gnome,xfce,lxde; The experimental building has been used LXDE and XFCE cooking surface environment.
    2. 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.
    3. 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.
    4. 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.
    5. 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.
    6. Man command,--help command.
Section III User and file Rights management
    1. 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.
    2. su-l [username] Switch User, adduser add new user.
    3. 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 .
    4. Delete User Deluser.
    5. View the file Permissions ls-l command, which will look at file type permissions.
    6. chown [Username] [file name] Change file owner.
    7. chmod change file permissions, binary numeric representation, and add and subtract assignment operations.
Section Fourth Linux directory structure and file basic operation
    1. 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.
    2. Use the tree to see the purpose of each directory and to understand it in general.
    3. 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).
    4. Touch creates a file, MkDir creates an empty directory.
    5. CP [filename] [Copy to the location],-r-r all files under the copy directory.
    6. RM [FileName] Delete file,-F Ignore prompt to force delete,-R to delete entire folder.
    7. MV [source directory file] [destination directory] File move, MV [old filename] [new filename] File rename
    8. Rename Batch Rename
    9. 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.
    10. More one-way paging view files, less two-way paging view files.
    11. Head view the first n rows of the file, tail view the file after n rows.
    12. File to view the type of files; Vim edit file.
Section fifth environment variables and file lookup
    1. Use declare to create variables (letters, numbers, underscores), = Assignment, echo $ to see the value of the variable.
    2. Use set, env, export (range from largest to small) to view variables in the shell. Export exports a custom variable as an environment variable.
    3. 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.
    4. 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.
    5. Variable modification

    6. The unset command deletes an environment variable.
    7. 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.
    8. 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
    1. A variety of packaging and decompression methods.

    2. 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.
    3. Du view file size,-H for people to read,-d [number] to view file depth.
    4. 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.
    5. 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.
    6. Unrar extract rar file, x full path decompression, e remove path decompression.
    7. 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
    1. DF command to see the disk capacity,-H people can read the way.
    2. 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.
    3. Du in addition to the previously mentioned-H,-D,-a displays all file sizes, and-s displays totals only.
    4. 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].
    5. 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].
    6. Mount command mount disk, basic format mount [options] [source] [directory]. Umount Uninstall, directly mount the location of the file.
    7. 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.
    8. All loopback devices in the/dev/loop directory can be viewed with the LS command.
    9. The KPARTX program is used to establish a mapping of virtual devices for each partition,-av establish mappings, and-DV unmap.
    10. Losetup [loopback device] [mirroring] establishes an association.
    11. 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
    1. 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.
    2. The help command gets assistance, helps [built-in command]; [external command]--help. Not in zsh, need to cut to bash.
    3. Man command gets help, man [command],man ls open manual.
    4. The info command gets help, info [command], and general bash comes with the info command.
    5. Don't forget the little copy--cheat command.

20165316 preparatory work 3 Linux installation and learning

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.