User and password commands in linux
- Remove command Syntax.
- # rm [option] file
- # rmdir [option] directory
- Frequently Asked Questions in Remove Command
- 1. How to check who currently logged into the system?
- # whoami
- The above command tells who logged into the system.
- 2. How do I know what are the users created in linux?
- # cat /etc/passwd
- All the created users will be in passwd file
- 3. How to create new user account in linux?
- Syntax:
- # useradd username
- Example:
- # useradd -p A18jio guest
- The above command creates a user called "guest" with password "A18jio".
- 4. How to change the password of currently logged in user?
- Syntax:
- # passwd enter-password
- Example:
- # passwd y3d3#uj
- The above command changes the currently logged in user password.