- Create directory testdir:mkdir testdir
- Enter directory testdir:cd testdir
- Create empty file in TestDir 1: Touch 1
- Create empty file in TestDir 2: Touch 2
- Delete file 2:rm 2
- Delete Empty directory: RmDir dirname
- Delete Non-empty directory: RM-RF dirname
- Copy file: CP 1 2 (copy file 1 to file 2)
- file movement: MV 1 dir (move file 1 to directory dir)
- directory move: MV dir dir1 (move dir to Dir1 below)
- back to root directory: CD/
- return to the current user's home directory: cd ~
- return to Parent directory CD:
- list all contents in directory: LS
- List permission information for all content under directory: Ls-l
- View your current working directory: PWD
- Clear Screen: Clear
- View Ip:ifconfig
- Switch User: su root (switch to root user)
- Shutdown: Shutdown (This version I use only the root user can execute shutdown command)
- Create User: Useradd testuser1
- Add or change password to the specified user: passwd testuser1 (change password to testuser1)
- Delete User: Userdel testuser1
- Create group: Groupadd gtest
- View the group information for the current User: Groups
- add a user to a group: Usermod-g gtest testuser1 (add testuser1 to Gtest group
Linux Command Memo (CentOS 7)