Linux classroom commands

Source: Internet
Author: User
Linux classroom commands-general Linux technology-Linux technology and application information. For details, refer to the following section. Producer: Ning Chunyan? (String) _ (Space)

1. Command-input (a c r o s I) a, I commonly used

2. Command-last line (:)

3. Return to command mode ESC

4. mkdir _/directory (create directory)

4.1 rmdir/rm _/directory /? (Delete a directory or/file)

4.2 rm _-r _/directory (delete all files under this directory)

4.3 rm_abcd ?, Rm_a *

4.4 mv _? 1 _? 2, mv _? _/Directory, mv _/directory (move or change the file name)

4.4 cp (copy a file)

4.5 cp _-r _/directory

5. touch _? 1 _? 2 _? 3 ...... (Create a file)

6. vi _? (Open a file)

7.: q! : Wq (exit, strong retreat, save and Exit)

8. PAGE63

9. yy (copy), p (paste)

10 .:/? (Forward search ):?? (Reverse search) n (Continue search)

11. v (visual mode, mainly used for multi-row replication)

12. PAGE68/69, for example, 3, 5 W _? (Copy the content of a file to another file)

13.: 1, $ _ s /? 1 /? 2/g (? 2 content replacement? 1 content, g replace all)

14. PAGE70, dd (delete a row), x (delete a character)

15. vi _-o _? _?, Vi _-O _? _? (Horizontal split, Vertical Split display file)

16. PAGE73 (let's take a look)

17. PAGE104! Ls, ls _-l (long file), LL, ls_a (hidden file), ls_al (Query file information in the current directory), ls _/, ls _ directory, ls _ -- ver, dir

18. ls _ parameter | grep _? (View include? Directory or file)

18.1 clear (clear screen), date (display date)

19. man _ command, command _ -- help,-h, help _ command, info _ command (view command parameters)

20. q, ctrl + z, ctrl + c (exit parameter view), enter, space, ctrl + q (same as alt + f4 in windows ),

20.1 yelp (equivalent to win Help and Support)

21. history (view history commands. The default value is 1000)

22. R (read permission) W (write) X (execution)

23. root (who owns it), root (which group belongs)

24. Blue (directory), Green (executable), red (system), light blue (connection)

25. halt (shutdown), init _ 0, shutdown-h (time)

25.1 reboot (restart), init_6

26. ALT + F2, ALT + F3 ............ ALT + F6 (open multiple virtual interfaces)

27. TAB (file name completion)

28. pwd (view the current user location)

29. du _?, Du _-s _/directory (view the file, the directory's capacity)

30. cd _/directory (change working directory) cd ~, Cd (return to the root working directory ),

Cd ~ Username, exit (exit Terminal)

31. file _? (View File Types)

32. tail _?, Head _? (Display the last/first lines of the file)

33. mount _/dev/cdrom, cd _/mnt/cdrom (mount the file system/hardware and enter)

34. umount _/mnt/cdrom (unmount)

35. PAGE101, find _. _-name _ "y *. *" (search for files starting with y in the current directory)

36. grep _? _ File name

37. cat _? (View File Content)

38. less _? (View the file content, B flip the page, 0-then p, view by file percentage)

39. PAGE112, useradd _? (Add user), passwd _? (Add password)

40. PAGE104, Set permissions

41. su _ User Name (switch user, but do not change permission/environment)

42. su _-User Name (switch user, change permission/environment)

43. chmod u + r, g + x/user

44. ls-ld/directory (view directory permissions)

45. gpasswd-a/-d/-r username group name

-A: Add a specified user to the group.

-D. delete a specified user from the group.

-R: Delete the group password.

Set the group password by using the gpasswd command when no option is used

46. chmod o + w/directory/file name

47. chown user name/directory/file name

48. chown-R user name/directory

49. groupadd group name

50. useradd-g group name username, userpsswd/passwd _ % username % (Change User Password)

Cat/ect/passwd | grep User Name

51. userdel-r user name

52. groupdel group name

53. groupmod group name

54. vipw/etc/passwd (manually modify the user configuration file)

55. vigr (manually modify the group configuration file)
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.