Linux Study Notes

Source: Internet
Author: User

Linux systems are still widely used in the company, but we have been afraid of linux systems before they become available. However, after several days of contact, I had some ignorance about linux. Here, I will write down my notes on the linux system these days.

First, install linux. I installed it on a virtual machine. vmware is recommended for virtual machines. The linux version used in this test is: [Red Hat Enterprise Linux.5.4].

Linux image download: http://www.linuxidc.com/Linux/2011-09/43704.htm

After installation, go to the system!

Enter the user name and password to go to the system's main interface;

Generally, the use of computers is based on basic operations such as normal boot and shutdown. However, in a linux system, if you still use simple operations such as the mouse on the interface to shut down, it will feel much inferior. in linux, there is a terminal drive, so we can use commands (that is, shell commands) to control the kernel to complete task operations. So I checked some information and sorted out the following operation instructions:

    • # Shutdown-r now
    • # Init 6

    Based on the preceding commands, you can use shell commands to perform normal shutdown and restart system operations.

    After learning how to switch the host, I learned about the folders in the root directory of the system. Their responsibilities are as follows:

    /Bin stores common user commands

    /Boot storage core, module image, and other files required for startup

    /Dev stores Device Files

    /Etc storage service configuration directory and file

    /Home stores the home Directory

    /Lib stores library files, such as core modules and drivers

    /Lost + found stores orphan files for fsck

    /Common mount points used by the mnt system to load the File System

    /Opt third-party tool installation directory

    /Proc Virtual File System, including system information and other materials

    /Root user's home directory

    /Sbin command for Storage System Management

    /Tmp temporary file storage point

    /Usr stores files and directories directly related to users.

    /Var data that may be changed during system operation

    The specific functions of these folders are roughly understood. In this way, we can conveniently manage files and system management and maintenance in the future.

    After learning about the general functions of folders in this directory, you can learn about user permissions.

    User Permissions generally involve permission types and user groups;

    Permission types include r (read permission), w (write permission), x (Execution permission), and two adventure bits (s, t) these two are not very important at the beginning. I will not introduce them in detail. They involve three concepts: setu id, set gid, and sticky.

    The numbers are: R-4; W-2; X-1; setuid-4000; set gid-2000; sticky-1000

    Then, we will understand the concepts of file owners, user groups, and other users. These three concepts are three important concepts that we need to understand when processing the permissions of folders or files.

    U-file owner: We will assume that the owner of the file I created is me. We can say that this statement is half the same. This statement is designed to be the root user's right to change the file owner. The command is chown.

    G-file group. Of course, this can also be changed by the root user. The command is chgrp.

    O-other users. This is the user who is neither the file owner nor the file owner group.

    A-a collection of file owners, file groups, and other users!

    Through the above information, we can understand the permissions of the file. Next we will introduce the object type identification;

    File type identifier:

    -General Files

    D directory file

    Block B Device Files

    C character Device File

    L link file

    P manual Pipeline

    Here is an example for your understanding:

    If we have a file named "install. log", you can enter # ls-l install. log in the shell to view some related information about it. As shown in:

     

    The displayed-rw-r -- root indicates that the file is a common file, the file owner is root, and the file owner group is root, the file owner has read and write permissions, but has no execution permission. The members of the file group and other users have only the read permission on the file.

    If we want to change the permission of the group to which the file belongs to read/write, we can execute the following command:

    The execution result is as follows:

    < p>

    2.

    < p>

    3.

     

     

     

     

    Common File Operation Commands include cp, rm, mv, ln, find, and touch.

    Directory operation commands: ls, pwd, cd, mrdir, rmdir

    Some Usage and Parameter Details of these commands. There are corresponding help documents in linux, which can be called using the following method:

    Command -- help

    Man command

    The help information obtained by man is more detailed than that obtained by help. Therefore, we recommend the man command.

     

    There are also some commands such as whereis, which, and who.

     

    Linux has a variety of operations and is interesting. This article only records my first week of linux system access. Sorry for the poor writing!

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.