Linux Learning Notes

Source: Internet
Author: User

Watch a two-hour blitz of Linux on the Web to add a bit of Linux knowledge. Thinking about two hours a day can be learned immediately, the result of a messy thing dragged four or five days, the actual completion of a task more than expected to complete the task of two. Okay, "stop whining."

1. Linux users, sub-super users and ordinary users

Superuser Root has only one, home directory under /root , with the highest permissions.

Users can have more than one user, the home directory under /home/user , partial permissions.

Add user Useradd user1

The benefit of switching user Su-user1 (plus the Middle "-") is that you can switch to the user home directory or not add it.

2. Environment variable Path (I understand the environment variable path under Windows, the same effect)

When a command is executed, the command is looked up from the directory contained in path and the current directory, and if it is not found, it is prompted to command not found

  Execution commands can also be executed in the same way as relative or absolute paths, such as executing: /test , /usr/local/mycmd/test

Temporarily modify PATH export path= $PATH:/usr/local/mycmd/test This method is only valid for this login

Permanently modify PATH: add export path= $PATH at the end of the/etc/profile:/usr/local/mycmd/test, after logging back in, you can execute the C9>test .

3.linux file Permissions

  

1. -rwxrwxr-x Altogether 10 bits, the first bit represents the file type, "-" is the file, "D" is the folder, the rest of the bits represent three user rights, the first three permissions of the owner, the three bits belong to the owner user group, and the last three bits of the other user's permissions.

Permissions to modify a file chmod 777 filepath , Linux files have three rights R read , W write , x execution , 111, 1 in octal notation 10, 000 ..., turn into decimal is 7, 6, 0 ...

2. liuchw LIUCHW The former represents owner, which indicates group (user group)

3. Size 4. Time

  

  

  

Linux Learning Notes

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.