20165111 Linux Installation and learning

Source: Internet
Author: User
Tags readable touch command

The third time the homework.

First apologized: Because I want to go back to the Chinese New Year, and home No network, in the home can not read courseware, also can't write blog, so in order to hand over the homework, this blog I can only be completed in the year before, the course did not read to write, some content has not seen, the article is also relatively short. I'm really sorry!

(i) Installing virtual machines

Install the virtual machine according to the teacher's task first. Mentoring is simple, but there are a lot of problems--outside the process.

Q1: The "Unknown reason installation Failed" is always displayed according to the teacher-given link to install VirtualBox5.2.7 (latest version) and Mount Ubuntu16.04. The cause of the problem is unclear, only in unofficial channels to download a 5.2.6 version of VirtualBox and Ubuntu16.04, but use everything normal. Q2: A Ubuntu-64-bit operating system could not be established when the virtual machine was created vituralbox the point of opening. CPU virtualization is not turned on, and CPU virtualization must be turned on in the BIOS. CPU Virtualization Introduction and Operation: Link to install the virtual machine enhancements, look at the time do not know which code to enter. Q3: When I saw that, I saw the Blue code (which was later known to be the directory) and the white Code (which was later known to be the actual code to be entered) and did not know what to enter. And then I didn't know when I saw the banner command in the course. only the white code is the input. Q4: After installing the banner command in the lab building, I also wanted to install the command in my own virtual machine, but was told that Root was not enough. After searching online, modify the root weights as per the methods provided in this article. (ii) Start learning

When you see a command in the course list and then a command, the whole person's eyes are going to be spent--is this linux so complicated?

However, when I see the first "Linux system Introduction" in the "How to learn Linux" in the 1th, said the " positive learning mentality ", the three points that impressed me the deepest is the 2nd:

Linux mostly operates under the command line, and can accept no or less graphical interfaces.

With this sentence, I also know that-there is no need to complain about the complexity of Linux, complaining about what "Windows is good, it is not so complex" and so on, do the psychological preparation, peace of mind to learn every command it!

In accordance with the order of the course of instruction, try to follow the instructions to do the experiment, when the feeling that they can complete the experimental content, I opened the test-found that they are only concerned about the knowledge of the experiment, a lot of details are not paid attention to, but also back to read many times the article plus online search data, just completed the test.

This is to give me the next Linux learning to wake up-do not just focus on the experimental points, there are many articles in the details, and may even need to find their own data development.

The article is a little rush, plus the course has not been completed, only a hasty end. Finally attached to the completion of a few homework reports, or because of the reason for the time of submission, failed to complete all the work, to the teacher said sorry. I will be back after the completion of the!

Welcome to crossing comments. Improper content is welcome to the teacher and everyone crossing correct!

Attached: Completed job report Lab 2 Jobs

Install the Toilet,figlet command

Operation

Enter the following command under Terminal

/安装toilet命令/sudo apt-get updatesudo apt-get install toilet
/安装figlet命令/sudo apt-get updatesudo apt-get install figlet

Enter y after ejecting the contents as shown, that is, the installation is complete!

The results of the two commands are shown below

Note 1

The experimental building provides root permissions, and generally their own virtualbox virtual machine on the experiment, generally do not provide root permissions, there will be a situation can not be installed.

You will need to modify the root weights as described in this article to install them.

NOTE 2

Banner command input is not case-sensitive, both output uppercase letters, just enter lowercase letters when the output of small capital, and the Toilet,figlet command can!

Lab 3 Jobs

Add a user loutest, use sudo to create the file/opt/forloutest, set to user loutest can read and write. And the operation process is written into the experimental report.

Action Step One: Create a loutest account

Code

sudo adduser loutest

Effect

Step Two: Add the Loutest account to the sudo user group

Code:

sudo usermod -G sudo loutestgroups loutest/此条为验证/

Effect


Indicates that Loutest is already part of the sudo user group

Step three: Create a forloutest file

Code

cd /opt/sudo touch forloutestls -l/此条为验证/

Effect

By diagram, this directory does forloutest, and understands that its current permissions are user-groups-others:6-4-4

Fourth step: Use the chmod command to modify the weight value

Because Loutest and Shiyanlou are the same sudo user group, the groups permission is modified to RW (the weight value will be modified to 6).

Use command chmod (because the user is root, so add sudo before)

Code

sudo chmod 664 forloutestls -l/此条为验证/

Effect

At this time forloutest current permissions are user-groups-others:6-6-4, so with the user group Loutest already have read and write permissions.

Lab 4 Job 1

Create a homework directory, build a file named 1.txt~10.txt, and delete the 1.txt~5.txt.

Action Step One: Create a homework directory

Using the mkdir command

Code

mkdir homeworkll -l/此处为验证/

Effect

The visible directory has been created!

Step Two: Establish 1.txt~10.txt

Using the touch command and wildcard characters

Code

cd homeworktouch {1..10}.txtll -l/此处为验证/

Effect

The visible file has been created!

Step Three: Delete 1.txt~5.txt

Using RM commands and wildcard characters

Code

rm {1..5}.txtll -l/此处为验证/

Effect

Visible 1.txt~5.txt has been removed!

Job 2

Which directory is the log file for Linux?

For

From the picture, it is stored in the Var directory.

This article gives a detailed list of the various storage directories for each log.

Lab 5 Jobs

Find all files that end with. List in the/etc/directory

Using the Locate command

Code

locate /etc/\*.list

Effect

Challenge 1 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 others, but other users do not have access.

Goal

1. Locate the Sources.list file

2. Change the file owner to yourself (Shiyanlou)

3. Modify the permissions to only their own readable writable

Action Step One: Locate the Sources.list file in the/etc/directory

Using the Find command

Code:

sudo find /etc/ -name sources.list

Effect:

The file is visible under the/etc/apt directory.

Step Two: Modify the owner

Enter the directory first, and then use the Chown command to modify

Code

cd /etc/aptsudo chown shiyanlou sources.listll sources.list/此条为验证/

Effect

Step Three: Modify Permissions

Only self-readable and writable, the weight value is 600

Using the chmod command

Code

chmod 600 sources.listll sources.list/此条为验证/

Effect

Visible at this time the weight of only the RW itself.

Lab 6 Jobs

Create a file named Test, packaged in zip and tar, and then extracted to the/home/shiyanlou directory.

Action 1. Package and unzip with zip command

Package with zip command, unzip with unzip command

Code

touch testzip -r -1 -o test.zip testunzip -q test.zip -d /home/shiyanlou
2. Package and unzip with the TAR command

Use the tar command with different parameters

Code:

touch testtar -cf test.tar testtar -xf test.tar -C /home/shiyanlou
Effect
ll -l/此处为验证/

Test.tar and Test.zip are available in the visible directory

20165111 Linux Installation and learning

Related Article

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.