Getting Started with Linux basics

Source: Internet
Author: User

Experiment One ( Introduction to Linux Systems ):

Learned some important people about Linux, and

Experiment two (basic concept and operation):

Linux Terminal1.Terminal (terminal): when you switch to one of the terminals and want to switch back to the GUI, you can press [Ctrl] + [Alt] + [F7] to complete. 2. Important Shortcut keys:

[Tab]

Use the Tab key to complete the command, Tab key General keyboard is next to the letter Q , this technique brings you the greatest advantage is that when you forget the full name of a command you can just enter the beginning of a part of it and then press the Tab key can be prompted or help to complete

[Ctrl + C]

You have not encountered this situation, when you inadvertently entered a command in the Linux command, or the wrong use of a command, resulting in the terminal you can not expect the situation, for example, only the cursor in the blink can not continue to enter the command, or constantly in the output of a lot of you do not want results. What should you do if you want to stop immediately and return to your controllable state? At this point you can use the Ctrl + C key to forcibly terminate the current program (you can rest assured that it does not cause the terminal to exit).

Key function
Ctrl+d Keyboard input end or exit terminal
Ctrl+s Tentative current program, pause and press any key to resume operation
Ctrl+z Put the current program in the background to run, revert to the foreground commandfg
Ctrl+a Move the cursor to the input wardrobe equivalent to the Home key
Ctrl+e Moves the cursor to the end of the input line, equivalent to the End key
Ctrl+k Remove from cursor position to end of line
Alt+Backspace Delete a word forward
Shift+PgUp Scroll the terminal display up
Shift+PgDn Scroll down the terminal display
Work Results:

Experiment three (user and file Rights Management):

1. View the user

2. Create a user

3. User groups

4. Delete a user

Work results:

Experiment four (Linux directory structure and file basic operation):

1, the Linux file organization directory structure.

2, relative path and absolute path.

3, the movement of files, copying, renaming, editing and other operations.

Work Results:

Experiment Five (environment variable and file lookup):

The role and usage of environment variables, and several methods of searching files, learn these techniques to use Linux efficiently.

Work results:

Experiment six (file packaging and compression):

The compression/decompression tools commonly used on Linux, introducing the use of Zip,rar,tar

如:1.zip Compression PackagerTo use the Zip Package folder:
    • $ zip-r-q-o Shiyanlou.zip/home/shiyanlou
    • $ du-h Shiyanlou.zip
    • $ file Shiyanlou.zip

Set the compression level to 9 and 1 (9 max, 1 min), RePack:

$ zip-r-9-q-o shiyanlou_9.zip /home/shiyanlou-x ~/*.zip

$ zip-r-1-q-o shiyanlou_1.zip /home/shiyanlou-x ~/*.zip

Create an encrypted ZIP package

$ zip-r -e-o Shiyanlou_encryption.zip/home/shiyanlou

Work results:

Experiment seven (file system operations and Disk Management):

to view the capacity of a disk using the DF commandto view the capacity of a directory using the du commandTo create a virtual image file using the DD commandformat a disk with the MKFS commandMount a disk to a directory tree using the Mount commanduninstalling mounted disks using the Umount commandusing the Losetup command to establish an association between a mirror and a loopback device

Work results:

Experiment Eight (Command execution sequence control and piping):

Sequential execution, select execution, piping, cut commands, grep commands, WC commands, sort commands, and more, efficiently use Linux techniques.

Work results:

Experiment nine (simple text processing):

1.tr command

The TR command can be used to delete some text from a piece of textual information. or convert it.

How to use:
tr [option]...SET1 [SET2]
The common options are:
Options Description
-d Delete and Set1 matching characters, note that not all words match or match by character order
-s Removes set1 specified characters that are contiguous and repeated in the input text

2.col command

The col command can be Tab built with a number of equivalent spaces, or reverse the operation.

How to use:
col [option]
The common options are:
Options Description
-x will be Tab converted to spaces
-h Convert a space to Tab (the default option)

3.join command

Users who have studied the database should not be unfamiliar with this, and this command is used to merge the same line that contains the same content in two files.

How to use:
join [option]... file1 file2
The common options are:
Options Description
-t Specify delimiter, default is space
-i Ignore Case differences
-1 Indicates which field the first file is to compare with, and the default compares the first one
-2 Indicates which field to use for the second file, and by default compares the first one

4.paste command

pasteThis command join is similar to a command, which simply merges multiple files together to separate them without comparing the data Tab .

How to use:
paste [option] file...
The common options are:
Options Description
-d Specifies the merged delimiter, which is tab by default
-s Do not merge to one line, one row for each file

Work results:

Experiment 10 (Data flow redirection):

1. Simple Redirection2. Standard error redirection3. Use tee commands to redirect to multiple files at the same time4. Permanent Redirection5. Create an output file descriptor6. Close the file descriptor7. Output of a fully shielded command8. Using Xargs to split the parameter list

Work results:

Lab 11 (Regular expression Basics):

grep, sed and awk these three commands

Work results:

Experiment 12 (software Installation under Linux):

Already downloaded.

Work results:

Getting Started with Linux basics

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.