20165220 preparatory work 3 Linux installation and learning

Source: Internet
Author: User
Tags first string parent directory file permissions

First of all, for this third job, give me the preparation time really not much, because the new year back home 6 days, there is no way to study and think in a timely manner, returned to the House will be a cursory look at the relevant operation with the tutorial to complete the work, this is mainly to learn some basic operations, for the beginning of Java learning lay a series of

* * Installation: Initially thought the project is very simple, in the past also in their own notebook to see the tutorial installed software, but the actual operation has been a bit of a problem. I started by the tutorial download, in the new virtual machine, only found that there are Ubuntu32, no 4-bit, but still bite the bullet to go down. Later appeared can not open a new task for the virtual computer, I puzzled for a long time also sent the forum, finally Baidu found the answer, and then in the settings of the 32-bit changed to 64-bit, so that the installation can be completed. (The second Problem solution: The second problem through Baidu has been resolved, is not configured in the computer BIOS, just boot when the F2, the first key to switch to the corresponding configuration interface, and then the upper and lower keys to find the corresponding Intel Virtualtechnology that one then by adding a minus sign, change the value from the previous disable to enable.
--["Tutorials"] (http://www.crifan.com/what_is_bios_and_how_to_configure_bios/)

** Learn the learning methods of Linux commands by practicing the ingenious learning method of Linux command * *: Operating system for you to complete all "hardware-related, application-independent" work, to give you convenience, efficiency, security. Operating system features I summarize two points: housekeeper and waiter: housekeeper: The CPU, memory, I/O devices of the computer are managed by three important abstractions of process, virtual memory and file.
Waiter: Provide a shell for the user and provide system calls to the programmer.
Everyone is more familiar with the Windows operating system, Linux is also an operating system.



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 Linux command and the man command are well understood! The teacher has a very detailed explanation and explanation,

The Netizen "Ichaobuster" said, "command line is the user through the keyboard input character instruction, computer output character result of a kind of man-machine interaction." Unlike the GUI, which mainly uses the mouse, the image and so on, the command line usually needs the user to memorize the operation commands. With the command line being memorized, it is often faster and easier to perform bulk operations than using a graphical user interface.
After reading [The Ingenious Linux Command learning method], I have a general understanding of the Linux learning structure. Before that, I read a book one by one to experience the command, the teacher provided the structure of the map and the experimental building mind map deepened my impression of Linux. When I see the second "Man command", I have a simple resolution of the command category. The order of the previous impressions was only circled between the 1.2 classes.
The program can reduce the workload in the repetition, in the future study I think I will try to call the function more, and understand.

After learning the reference, I think a lot of the command is to perform the operation of the English word abbreviation, write down the command of the English may help to memorize commands. Section Fourth Linux directory structure and file basic operation directory path use the CD command to switch directories, which are used within 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)

Basic operation? Touch: Create a blank file? mkdir (Make Directories): Create an empty directory, or specify a permission attribute to create a directory (using the-p parameter while creating the parent directory (if the parent directory does not exist)? CP (copy): Copy a file or directory (with the-R or-r parameter, which indicates recursive replication) to the specified directory? RM (remove files or directories): Delete a file (can be forced to delete using the-f parameter) or the directory (add-R or-r parameter)? MV (move or rename files) Source directory file destination directory: Move files (cut)? mv old filename New file name: Rename file? Cat,tac and nl: View files? More and less: paging through files? File:

Section fifth environment variables and file lookup environment variables? Declare: Create variable? = Assignment Symbol: Assign a value to a variable? Echo and $ symbol: Read the value of the variable? Set: Displays all environment variables for the current shell, including the built-in environment variables (related to shell appearance, etc.). User-defined variables and exported environment variables? ENV: Displays all environment variables for the current shell, including the built-in environment variables (related to shell appearance, etc.), user-defined variables and exported environment variables? Export: Shows variables exported from the shell to environment variables, Can you also export custom variables as variable variables for environment variables? ${variable name # Match string}: Start from the back to match, delete the shortest data matching string? ${variable name # #匹配字串}: Start from the back to match, delete the longest data matching string? ${variable name% match string}: Start matching from tail forward, delete the shortest data matching string? ${variable name percent match string}: Start matching from tail to delete the longest data that matches the matching string? ${variable name/old string/new string}: Replace the first string that matches the old string with the new string? ${variable name//old string/ New string}: Replace all strings that match the old string with the new string? unset: Delete an environment variable? Source: Let environment variables take effect immediately search for files? Whereis simple and fast (querying directly from a database, only binary files, man Help files, and source code files)? Locate fast and full (can I find different file types under the specified directory)? Which small and fine (usually used to determine if a specified software is installed)? Find fine and thin (not only can you find it by file type, but you can also search by file's properties)

Because the study time is limited, so picked the key to see, the experiment has a lot of things not too clear, the study at home for two days, to do the right to modify there, time limited school will take a moment to see. This blog is a relatively time-consuming, the main thing is too much, look quickly but want to remember it is very difficult. Usually should take a little more effort to see, so as to ensure that progress can keep up.

Briefly summarize the 1. Create, delete users, and user groups in Linux.

The file permission settings in 2.Linux.

This is done by opening the terminal and entering the Linux command for effective user and file operation.

The main commands to use are:

View users $ Who am I or who mom likes

Create user $ sudo adduser

User Group 1.groups command $ groups 2. View/etc/group files $ cat/etc/group | Sort

Remove user $ sudo deluser

View File Permissions $ ls-l

Notice of Discovery:

$ su <user> command switch to user users, need to enter password for target user when executing

$ sudo <cmd> command runs cmd command at privileged level, requires the current user to belong to the Sudo group, and needs to enter the current user password

$ su-<user> command to switch the user, while the environment variable will change to the target user's environment changes

Linux directory structure and file basic operation

The commands in this section are:

Switch Directory $ cd

Go to the top level directory $ CD.

Go to the "Home" directory $ cd ~ or $ cd/home/< your user name >

Get current Path $ pwd

New File $ touch

New Catalog $ mkdir
(If you use the-p parameter, you also create a parent directory that does not exist before $ mkdir-p)

Copy file $ cp < Copy file name > < Copy to the file name >

Delete a file or directory $ rm
(Adding the-F parameter forces the deletion of the file or directory $ rm-f)

Move files $ mkdir < target folder >$ MV < move files > < target folders >

Rename file $ mv < old file name > < new file name >

View File $ cat (Join-n Display line number)

View File types $ files

Edit File $ vimtutor

20165220 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.