The last command displays the history of user login and logout actions, along with the actual time and date. It also has options that enable you to filter users who have logged in through a specific terminal. For example, last 1 will display the details of users who logged in using the first terminal. The […]
w: command not found
The w command is primarily used to display the details of users who are currently logged in to a system and their transactions. The first line of the output displays the status of the system. The second line of the output displays a table with the first column listing the users logged in to the […]
who: command not found
The who command is used to determine the details of users currently logged in to a system. The output of the who command includes the user name, the name of the system from which the user is connected, and the date and time that the user has been connected since. Syntax The syntax of the […]
whoami: command not found
The whoami command is used to display the user name with which you are currently logged in to the system. Sometimes, you may need to log in to a system and switch among different users, and you may not be sure with which user you are currently logged in. In such instances, you can use […]
groupdel: command not found
The groupdel command will delete groups from the /etc/group file. It does not delete user accounts that are members of the group. Exercise caution when deleting groups as a mistake can cause users to not be able to access resources. Syntax The syntax of the groupdel command is: # groupdel [options] {group names} The groupdel […]
groupmod: command not found
The groupmod command is used to change the group’s own attributes. It will edit the /etc/group file for you. Modifications of the group might include changing its name or GID. Adding a user to a group is considered to be a modification of the user, not the group. As such, it is accomplished using the […]
groupadd: command not found
The groupadd command creates a group. By default, the group has no members and no password. In addition to creating a group with a friendly name, you can also specify a group ID using the -g option. Some groupadd options include the following. Option Description -g Assign a group ID. -f Exit with a success […]
userdel Command Examples in Linux
The userdel command is used to delete user accounts. By default, it does not delete the user’s home directory unless you use the -r option. Deleting the user account removes all references to it. You would have to recreate the account and re-add it to groups in order to resemble the original identity. Use caution […]
userdel: command not found
The userdel command is used to delete user accounts. By default, it does not delete the user’s home directory unless you use the -r option. Deleting the user account removes all references to it. You would have to recreate the account and re-add it to groups in order to resemble the original identity. Use caution […]
useradd: command not found
The useradd command is used to create user accounts and configure basic settings. As part of the account creation process, useradd references several files: The account is stored in the /etc/passwd file. The account is configured according to various options set in the /etc/login.defs file. The account’s home directory is created at the /home/[account name] […]