Linux Video Learning (simple introduction) 20160405

Source: Internet
Author: User

Take a week to learn the Linux system's learning notes.

1.linux system is a high-security open source, free multi-user multitasking operating system.

2.linux work is divided into Linux system administrators, Linux programmers (software development on the PC, embedded development).

3.linux Process:

    1. Linux on the development of the platform, the basic operation of Linux.
    2. JAVA/C language Learning.
    3. Advanced Programming for UNIX environments.
    4. Linux application system development, Linux embedded development.

The content of 4.linux includes the basic and practical parts.

Basic part: Basic knowledge, Common Linux command, partition, VI, permission.

Useful parts: Samba installation and configuration, network environment configuration, crontab, Shell Introduction, Java programming, JKD, ssh,rpm, MySQL.

First day

Preliminary introduction of 1.linux.

Features of Linux:

    1. Free, open source.
    2. Support multi-user, multi-threaded.
    3. Safety.
    4. For memory, file management is superior.
    5. Linux consumes less memory.

2.linux First Contact.

    1. Shutdown-h now immediately shuts down the machine

Shutdown-r now immediately shuts down the reboot.

Reboot immediately shuts down and restarts.

StartX into the graphical interface.

Su-root switches the user to the root user.

Logout user logoff.

3.VI Editor.

    1. VI filename Creates a file with the filename called filename and opens it.
    2. Press the lowercase letter i to enter edit mode.
    3. Press the ESC key to exit edit mode and enter command mode.
    4. Save by Colon:,wq-> and exit,q-> do not save exit,w-> save,q!-> do not save Force exit, set nu-> display line number, set nonu-> does not display line number.

Compilation of 4.java Programs

Hello.java File Compilation:

1.javac Hello.java, a class file is generated.

2.java Hello command cannot add class, run class file.

Compilation of 5.c++ languages.

1.GCC Hello.cpp generates the default file name of a.out file. Gcc-o myfile Hello.java output myfile.out file.

2../a.out run the program.

6. File directory.

Linux is the structure of inverted trees. /represents the root directory.

The directory of the root root user's related files.

Home other user's directory of related files.

Bin Common Command Store path.

Sbin the storage path of a command that has certain permissions to execute.

MNT mounts the CD-ROM and floppy drive directories by default.

Boot to store bootstrap related files.

ETC configuration-related files.

var often changes the data, such as logs.

7.PWD (Print working directory) displays the current directory.

8. User Management.

The root user can add the user, Useradd name,

Delete User Userdel name,

Delete User and user home directory Userdel-r name

Change Password: passwd name

9. Specify the run level. Command: init [0123456]

0: Turn off the machine.

1: Single user.

2: Multi-user status does not have a network service.

3: Multi-user status has network service.

4: The system is not used for retention to the user.

5: Graphical interface.

6: System restart.

Common run levels are 3 and 5. To modify the default RunLevel, you can change the id:5:initdefault of the file/etc/inittab: The number in this row.

When entering the Grub boot interface, enter E, enter e when the second line is selected, and enter 1. (1 for single user)

1 for single user, can bypass password authentication, not read Inittab file, Other level read Inittab file.

10. Common commands (2)

PWD prints out the current working directory.

CD to switch directories.

LS lists files and directories.

Ls-a Show hidden files. Ls-l shows the long list format. Ls-alt displays detailed information by time sorting. The size and display details of the Ls-alh file.

mkdir Building a Directory

RmDir Deleting a directory

RM-RF folder name recursively delete folder

Touch to create an empty file.

CP sourcepath destinationpath copy sourcepath file to DestinationPath

Press the TAB key to automatically complete the command or file name.

More filename with paginated display file content, start from the beginning, press CTRL + PageUp on page, space or Ente page down,

CTRL + b page UP, CTRL + F PAGE DOWN.

Less filename

Tail filename Displays the end content of the file.

Cat filename Displays all the file contents.

| Pipe, handing the result of the previous command to the vertical bar | The following command is processed.

Grep-n "Search_char" filename finds a string in the file and displays the line number.

Common five parameters Acint, I ignore case, n shows line number, C statistic number,

The man command_name is equivalent to the Help documentation manual, showing the detailed parameters of the command.

Find directory-name search file name

< input REDIRECT command,> output redirection, overwriting the contents of the file.

>> output redirection, append to file

Linux Video Learning (simple introduction) 20160405

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.