This is the 24th day of my participation in the More text Challenge. For more details, see more text Challenge

1. Where is the file that stores the user account?

/etc/passwd

2. How do I delete a directory that is not empty?

Rm -rf Specifies the directory name

3. What command can I use to view the current working directory?

pwd

4. What command do I use to create a folder?

mkdir

5. Which Linux command displays one page at a time? What commands are used on the previous and next pages?

more

Space: displays the text on the next screen, and B: displays the text on the previous screen

6. What command displays the last 10 lines of a file

tail

tail -n 10 passwd

7. How do I return to the current user’s home directory?

cd ~

8. How do I count the number of lines in a file?

Wc-l Specifies the file name

9. What command can I use to check whether the network is normal?

ping

10. Which directory is the configuration file stored in?

/etc

11. Which directory is the nic configuration file stored in?

/etc/sysconfig/network-scripts

12. What command is used to force a folder to be deleted recursively?

Rm -rf Indicates the file name

13. How do I copy a file? What commands do I use?

Cp -r File Name Indicates the new file name

14. How do I create a folder and what commands do I use?

The mkdir filename

How to create a new file, and write the data “tsinghua University” inside the file, and append the data “computer Science and Technology” in the current file

touch file

< span style = “box-sizing: border-box; color: RGB (74, 74, 74)

Echo “computer science and Technology” >> hello

16. What command is used to view the contents of a file?

The cat filename

More filename

17. How do I view the current system time

date

18. What is the restart command?

reboot

19. What is the power off command?

halt -p shutdown now reboot -p

20. What is the difference between the sbin directory and the bin directory?

1. The /bin directory contains all system commands (default Linux commands). All commands in this directory can be used by all Linux users (including common users) and root users.

2. The commands stored in the /sbin directory can be used only by the root user. S means super, so sbin is the super management command

21. Where is the home directory of user root?

/root

22. On Linux, CD.. What does that mean?

Returns the upper directory

23.2> 1> 2>&1

1 is standard output and 2 is error output

> is the output redirection symbol.

2>&1 imports (merges) the error output into the standard output stream

24. What good is a pipeline operator |?

“|” is piping operator, or pipe. Using Linux pipe provided by the “|” to separate two commands, pipe the output of the command on the left will be as a pipe, the right of the command input.

25. How do I create 100 files simultaneously?

touch file{1.. 100}

26. In the root directory, find the folder whose name contains bin

ll | grep bin

27. How many modes does the VI editor have?

The VI editor has three basic working modes: command mode, text input mode, and last line mode.

28. How do I enter the insert mode of the VI editor

Press the I

29. How do I enter the visual interface mode of the VI editor

Press the v

30. How do I copy a line in the VI editor

Press y

31. How do I paste files in the VI editor

Press the p

32. How do I delete all data from rows 3 through 15

: 3 d

33. What command is used to create user Zhangsan

useradd zhangsan

34. Set the password of user zhangsan to 123456?

passwd zhangsan 123456

35. What command is used to delete a user?

Userdel user name

36. What command is used to switch users

Su user name

37. Where is the home directory of the zhangsan user?

/home/zhangsan

38.-rwxrwxrwx what does that mean?

Common files can be read, written, and executed by the current user. Users in the current user group can read, write, and execute. Other users can read, write, and execute

39. What does DRWX —— mean?

The folder can be read, written and executed by the current user

40. How to change the permissions of one folder to be readable, writable, executable and others are not allowed

chmod 700

41. Create group super and add Zhangsan to the super group

groupadd super

usermod -g super zhangsan

42. Log in to the root directory as user zhangsan, create folder test in the root directory, create test1. TXT in the test folder, and change the owner of this folder to root:root

chown root:root test1.txt

43. What command is used to view the help of commands?

man

44. How to install the software?

Yum install Specifies the software name

45. How do I uninstall the software?

Yum remove Software name

46. What does the wget command do?

The download file

47. How do I check where a command is installed?

Whereis command

48. What is the command used to save and exit the vi editor

:wq

49. If the vi editor does not save and exit, what command is used

:q!

50. How do I view the current IP address? ifconfig ip a