Linux command exercises

Source: Internet
Author: User

1. Open Linux operating system, require root user login Gnome GUI, language support choice for Chinese

2. Use the shortcut key to switch to virtual Terminal 2, log in as a normal user, and view the system prompt

3. Use the command to exit the logged on user on virtual Terminal 2

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

5. Use the command to exit the logged on user on virtual Terminal 5

6. Switch back to the graphical interface, right click on the desktop to open the terminal, enter the command to shut down the system

7. See which users are working on the system

8. The current time of modification is August 26, 2018 11:28

9. View the October 2015 calendar

10. Use two methods to view the instructions for using the LS command

Method One:

Method Two:

11. Clear the screen

12. Use "Useradd Tom" command to create a new Tom user, set the password for Tom user "123"

13. Switch the current user to Tom

14. View the user name used by the current login Linux system

15. Turn on the Linux operating system and require the root user to log in to the Gnome graphical interface

16. Right-click on the desktop to open the terminal and use the "Useradd Lucy" command to create a Lucy user

17. Use the mouse to click on the method to enter the root directory

18. Click the Home directory to enter the root user---/root

19. Click to enter the home directory of the Lucy user

20. Click to enter the directory---bin directory where you can store your frequently used executable files.

21. Click the directory to enter the executable file used to store the system---sbin directory

22. Click to enter the device files directory

23. Click to enter the profile directory

24. Create a directory WG

25. Create a new file in the WG directory using the absolute path method a.txt

26. Enter the WG directory

27. Create a new WG01 directory and b.txt in the current directory using a relative path method

28. List content in the current directory in long list format

29. Delete Empty directory Wg01

30. Go to the previous level working directory

31. Force Delete Non-empty directory WG

32. Copy/etc/passwd to the current directory, named File1

33. Read-only view of the contents of the File1 file in a non-stop manner

34. View the first 3 lines of the File1 file

35. View the following 2 lines of the File1 file

36. Paging through the contents of the File1 file as a percentage

37. Paging through pages to view the contents of the File1 file

38. 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 path/tmp, append to the start.py to write content

2: View the current path

3: Switch to the log directory, create a new directory access, and then move the Access.log to the directory.

4: Switch to the core directory, and then create a new auth.py file under the path

5. Open two terminals, one terminal to add content to the Access.log file, and then dynamically view the new content on the Access.log at another terminal.

6. Close the terminal above, and then write the content to the access.log in a overwritten manner

7: Delete/ftpserver directory

To create a folder procedure:

Mkdir-p/ftpserver/bin

Mkdir/ftpserver/conf

Mkdir/ftpserver/core

mkdir/ftpserver/db

Mkdir/ftpserver/lib

Mkdir/ftpserver/log

touch/bin/register.py

Touch/

1. Cd/tmp && echo "123" >> start.py

2.Pwd

3. Cd/ftpserver/log

Mkdir/ftpserver/log/access

MV Access.log/ftpserver/log/access

5. Open two terminals, one terminal to add content to the Access.log file, and then dynamically view the new content on the Access.log at another terminal.

Code: Echo 123 >>/ftpserver/log/access/access.log

echo 4444444444444444444444444 >>/ftpserver/log/access/access.log

6. Close the terminal above, and then write the content to the access.log in a overwritten manner

7: Delete/ftpserver directory

Linux command exercises

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.