Lab Building Linux Basics Getting Started (new) Challenge: Finding Files

Source: Internet
Author: User

Portal: https://www.shiyanlou.com/courses/running

Challenge: Finding Files Lab Environment:

User name: Shiyanlou

Password: 76036575

Find a File Introduction

There is a very important file (sources.list) but you forget where it is, you vaguely remember it in the/etc/directory, now you want to find out this file, and then set it to be accessible to you, but other users cannot access

Goal
    1. Locate Sources.list File
    2. Change the file owner to yourself (Shiyanlou)
    3. Modify the permissions to only be readable and writable
Tips
    • Find
    • chmod
    • Chown

Note: If fail does not have any prompt information, please refresh the page

Ideas:

Have told the need to use the command, this time as long as the above objectives to do is good:

1. Locate the Sources.list file

Input command: sudo find/etc/-name sources.list

Easy wrong point is to add sudo otherwise no permission to find. There is no way to put the address with a backslash, there will be errors

2. Change the file owner to yourself (Shiyanlou)

First enter the command: CD/ETC/APT reach the APT directory, then enter the command: LL view the file owner

Then use the command: sudo chown shiyanlou sources.list to change the file owner to Shiyanlou, at which point the owner has changed

3. Modify the permissions to only their own readable writable

I'm going to use the number method, R 4 W 2 x 1

Then the command you need to enter is: chmod sources.list and then look at it and you'll find the task is complete.

Let's submit the result:

Lab Building Linux Basics Getting Started (new) Challenge: Finding Files

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.