Linux basic commands and linux basic exercises

Source: Internet
Author: User
Tags clear screen

Linux basic commands and linux basic exercises

To enable the Linux operating system, you must log on to the gnome gui as the root user. Select Chinese as the language support.

Use the shortcut key to switch to virtual terminal 2, log on as a common user, and view the system prompt

Use the command to log out of the user logged on to virtual Terminal 2.

Use the shortcut key to switch to virtual Terminal 5, log on as an administrator, and view the system prompt

Use the command to log out of the user logged on to virtual Terminal 5

Switch back to the graphic interface, right-click the desktop to open the terminal, and enter the command to close the system

View which users work on the system

Change the current time to August 26, 2018

View calendar for January

Use two methods to view the ls command instructions

Clear Screen

Use the "useradd tom" command to create a tom user and set the "123" password for the tom user"

Switch the current user to tom

View the username used to log on to Linux

Use the "useradd tom" command to create a tom user and set the "123" password for the tom user"

Switch the current user to tom

View the username used to log on to Linux

To enable the Linux operating system, you must log on to the gnome gui as a root user.

Right-click the terminal on the desktop and run the "useradd lucy" command to create a lucy user.

Click the mouse to enter the root directory

Click to enter the root user's home directory

Click to enter lucy's home directory

Click to enter the directory for storing commonly used executable files

Click to enter the directory for storing executable files of the system

Click to enter the device file directory

Click to enter the configuration file directory

 

Create directory wg

Create an a.txt file in the wgdirectory using an absolute secret

Go to the wg directory

Create a wg01directory and a B .txt file in the current directory using the relative scripts.

List contents in the current directory in the long list format

Delete the empty directory wg01

Go to the upper-level working directory

Force Delete non-empty directory wg

Copy/etc/passwd to the current directory named file1

PS. Update, copy/etc/passwd to the current directory, named file2

 

View the content of the file1 file in read-only mode

View the content of the first three lines of the file1 File

View the last two lines of the file1 File

View the content of the file1 file by page as a percentage

The following paging method is used to view the content of the file1 file by page.

 

Create the following directory structure

Sh-3.2 # tree/FtpServer/

/FtpServer/

── Bin

│ ── Register. py

│ └ ── Start. py

── Conf

│ ── Settings. py

── Core

│ ── Server. py

── Db

│ ── User. db

── Lib

│ ── Common. py

── Log

── Access. log

 

1: switch to the/tmp directory and append the content to start. py.

2: view the current path

3: switch to the log directory, create the access directory, and then move access. log to the directory.

4: switch to the core directory and create the auth. py file in this path.

5. enable two terminals. One Terminal appends content to the access. log file, and then dynamically views the added content of access. log On the other terminal.

6. Close the above terminal and write content to access. log in overwrite mode.

7: delete/FtpServer directory

 

 

 

 

 

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.