20165111 Linux Installation and learning

Source: Internet
Author: User
Tags readable touch command

The third time the homework.

I have to make an explanation. Before I saw the blog in the garden to write homework deadlines, "there is a week", so I follow 7 days to forget the deadline, calculated that I came back from home the day before, so this is said I have to drive out of this blog years ago. Wait until the assistant's deadline notice, I noticed that the original deadline is the first day of school, so here to add content, resubmit!

(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.

Introduction and operation of CPU virtualization: Links

Install the virtual machine enhancements and don't know what code to enter when you look at it.

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. Later, when I saw the operation of the banner command in the course, I realized that only the white code was 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.

I recently looked at the list of tests, and a lot of people had higher scores than I did when they were less than me. This is to give me the next Linux learning to wake up-not only focus on the experimental points, there are many details of the article, and may even need to go to their own research and development of information, and also, when learning to think more, a lot of advice, and I hope you can help me a lot!

Finally, I enclose the reports of several assignments that have been completed, as well as the command notes with the progress of the completed reports.

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

Attachment 1: Completed job report Lab 2 job

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

Attached 2:linux Command Note Experiment 2 Basic concepts and Operation commands 1 touch syntax
touch filename
Meaning

To create a file named filename

Command 2 CD syntax
cd address
Meaning

Go to address Directory

Command 3 PWD syntax
直接输入
Meaning

View your current directory

Command 4 shortcut keys (for personal use)
shortcut Keys Operation
CTRL + C Terminates the current command and returns to the operating end
Ctrl+d End keyboard input or exit terminal
Command 5 wildcard character (personal use)
wildcard characters meaning
* Matches any number of characters (including 0)
Match any one character
{C1.. C2} Matches all elements in the C1 to C2
[C1. C2] Match all characters in C1 to C2
Experiment 3 User and File Rights Management Command 1 SU syntax
su username
Meaning

Switch to user username

Command 2 sudo syntax
sudo <command>
Meaning

To execute command commands with root privileges

Command 3 groups syntax
groups username
Meaning

To view the user groups that username belongs to

Command 4 usermod syntax
Meaning

Add username to sudo user group

Command 5 deluser syntax
sudo deluser username --remove-home
Meaning

Delete User username

Command 5 LS syntax
ls -l
Meaning

LS is used to list and display files in the current directory

Ls-l indicates that files are listed in a longer format

Command 6 chown syntax
sudo chown username filename
Meaning

Change file filename to user username

Command 7 chmod syntax
chmod *** filename
Meaning

Modify the value of filename to the weight represented by * * *.

Experiment 4 directory structure and file Basic Operations Command 1 mkdir Syntax 1
mkdir directoryname
Meaning

Create a directory named DirectoryName

Syntax 2
mkdir -p father/son/grandson
Meaning

Create a Multilevel Catalog

Command 2 CP Syntax 1
cp filename directory
Meaning

Move the filename file to the directory directory

Syntax 2
cp -r directory1 directory2
Meaning

Copy all files and directories under the Directory1 directory to the Directory2 directory

Command 3 RM Syntax 1
rm (-f) filename
Meaning

Delete file filename (in quiet mode)

Syntax 2
rm -r directory
Meaning

Deleting directory Directories

Command 4 MV Syntax 1
Meaning

Move the filename to the directory directory

Syntax 2
mv filename1 filename2
Meaning

Rename filename1 to Filename2

Experiment 5 environment variables and file Lookup command 1 DECLARE syntax
declare varname
Meaning

Creating variables

Command 2 = meaning

Used to assign a value

Command 3 echo syntax
echo $varname
Meaning

View the value of varname

Command 4 where,which,find,locate meaning

Search for files

Command 5 zip syntax
zip -r -q -o filename directory
Meaning

Package file filename to directory directory

Command 6 unzip Syntax 1
unzip filename.zip
Meaning

Unzip the zip archive to the current directory

Syntax 2
unzip (-q) filename.zip -d directory
Meaning

(in quiet mode) unzip the zip archive to directory directory

Command 7 tar Syntax 1
tar -cf filename.tar directory
Meaning

Create a tar file under the directory directory

Syntax 2
tar -xf filename.tar -C directory
Meaning

Unzip the Filename.tar to the directory of the specified known directories

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.