{"id":274673,"date":"2026-03-17T08:25:00","date_gmt":"2026-03-17T15:25:00","guid":{"rendered":"https:\/\/www.maketecheasier.com\/manager-users-linux-command-line\/?update=20260317"},"modified":"2026-03-17T08:25:00","modified_gmt":"2026-03-17T15:25:00","slug":"manager-users-linux-command-line","status":"publish","type":"post","link":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/","title":{"rendered":"How to Manage Users from the Command Line in Linux"},"content":{"rendered":"\n<p>Managing users is one of the most important tasks for any Linux administrator. Whether you manage a single system or multiple servers, keeping user accounts organized helps maintain control over the system. Proper user management also plays a key role in system security. Administrators should only grant access to people who truly need it and only for the time they need it. Giving unnecessary privileges may expose sensitive data or critical system resources. Here, we will explore command-line tools that allow administrators to create, modify, and remove user accounts directly from the terminal.<\/p>\n\n\n<nav class=\"content-toc-wrapper relative lazyblock-toc-Z2eql18 wp-block-lazyblock-toc\" aria-label=\"Table of Contents\"><div id=\"content-toc-header\" class=\"content-toc-header flex cursor-pointer items-center justify-between\">\n                <span class=\"text-sm font-semibold\">Table of Contents<\/span>\n                <span class=\"toc-caret\"><svg viewBox=\"0 0 24 24\" class=\"chevron\" width=\"16\" height=\"16\"><use xlink:href=\"#icon-chevron\"><\/use><\/svg><\/span>\n            <\/div><div class=\"content-toc hidden w-full\"><div class=\"toc\"><ul class=\"toc-content font-semibold\"><li><a href=\"#key-files-managing-linux-users\" class=\"toc-link block mb-6\">Key Files for Managing Linux Users<\/a><\/li><li><a href=\"#view-existing-users\" class=\"toc-link block mb-6\">Viewing Existing Users<\/a><\/li><li><a href=\"#useradd-add-users\" class=\"toc-link block mb-6\">Creating Users with the useradd Command<\/a><\/li><li><a href=\"#adduser-command\" class=\"toc-link block mb-6\">Creating Users With the adduser Command<\/a><\/li><li><a href=\"#change-user-passwords\" class=\"toc-link block mb-6\">Setting or Changing User Passwords<\/a><\/li><li><a href=\"#usermod-command\" class=\"toc-link block mb-6\">Managing Linux Users Using the usermod Command<\/a><\/li><li><a href=\"#adding-users-to-grou\" class=\"toc-link block mb-6\">Adding Users to the Groups<\/a><\/li><li><a href=\"#removing-users\" class=\"toc-link block mb-6\">Removing Users<\/a><\/li><li><a href=\"#viewing-user-login-activity\" class=\"toc-link block mb-6\">Viewing User Login Activity<\/a><\/li><\/ul><\/div><\/div><\/nav>\n\n\n<h2 class=\"wp-block-heading\" id=\"key-files-managing-linux-users\">Key Files for Managing Linux Users<\/h2>\n\n\n\n<p>Linux keeps user and group information in specific system files. These files store account details, passwords, and group settings, and administrators can use them to manage users and control access.<\/p>\n\n\n\n<figure class=\"wp-block-table table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">File \/ Directory<\/th><th class=\"has-text-align-left\" data-align=\"left\">Description<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">\/etc\/passwd<\/td><td class=\"has-text-align-left\" data-align=\"left\">Includes UID, GID, home directory, and default shell. Readable by all, editable only by root\/sudo.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\/etc\/group<\/td><td class=\"has-text-align-left\" data-align=\"left\">Shows group name, GID, and members. Used to manage group memberships and permissions.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\/etc\/sudoers<\/td><td class=\"has-text-align-left\" data-align=\"left\">Specifies which users\/groups can run commands as root. It must be edited carefully.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\/etc\/shadow<\/td><td class=\"has-text-align-left\" data-align=\"left\">Includes password hashes, expiration dates, and account info. Root-only access.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\/etc\/gshadow<\/td><td class=\"has-text-align-left\" data-align=\"left\">Contains group password info and expiration data. Root-only access.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\/etc\/skel<\/td><td class=\"has-text-align-left\" data-align=\"left\">Files like &#8220;.bashrc&#8221; and &#8220;.profile&#8221; copied to new users\u2019 home directories.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\/etc\/login.defs<\/td><td class=\"has-text-align-left\" data-align=\"left\">Manages password aging, expiration, and other security rules.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"view-existing-users\">Viewing Existing Users<\/h2>\n\n\n\n<p>One of the quickest ways to view existing users on a <a href=\"https:\/\/maketecheasier.com\/beginner-guide-to-using-linux-distro\/\">Linux system<\/a> is to examine the \u201c\/etc\/passwd\u201d file. This file stores basic information about all user accounts. You can view it using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo cat \/etc\/passwd<\/code><\/pre>\n\n\n\n<p>Here, each line in the file represents one user account.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"366\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-user-info-800x366.png\" alt=\"View User Info\" class=\"wp-image-859094\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-user-info-800x366.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-user-info-400x183.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-user-info.png 1018w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Alternatively, you can also check user information using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>id username<br>groups username<br>getent passwd username<\/code><\/pre>\n\n\n\n<p>The <code>id<\/code> command shows the <code>UID<\/code>, <code>GID<\/code>, and all groups the user belongs to. The <code>groups<\/code> command only shows the groups that a user belongs to. It does not display the UID or GID. While the <code>getent<\/code> command retrieves user account details from the system databases, including &#8220;\/etc\/passwd&#8221;, LDAP, or other configured sources.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"244\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-existing-users-info-800x244.png\" alt=\"View Existing Users Info\" class=\"wp-image-859095\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-existing-users-info-800x244.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-existing-users-info-400x122.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-existing-users-info.png 1018w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p><strong>Note:<\/strong> Modern Linux systems do not store password hashes in &#8220;\/etc\/passwd&#8221;. Instead, encrypted passwords are stored in the &#8220;\/etc\/shadow&#8221; file, which can only be accessed by the root user.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"useradd-add-users\">Creating Users with the useradd Command<\/h2>\n\n\n\n<p><code>useradd<\/code> is a low-level binary available on most distros. This command is typically less used because it is not as user-friendly and intuitive as the <code>adduser<\/code> command. However, there are very few differences, and either can be used.<\/p>\n\n\n\n<p>To find out more about useradd, run the <code>man<\/code> command or add <code>--help<\/code> to get a quick overview.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>man useradd<br>useradd --help<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"452\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-useradd-help-800x452.png\" alt=\"Linux Useradd Help\" class=\"wp-image-859096\" title=\"linux-useradd-help\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-useradd-help-800x451.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-useradd-help-400x225.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-useradd-help-797x450.png 797w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-useradd-help.png 1022w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Run the following command to add a new user with a home directory: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo useradd --create-home<\/code><\/pre>\n\n\n\n<p>This command creates a user and generates a home directory for it. However, if you skip the <code>--create-home<\/code> option, the user account will be created without a personal directory. After this, you can verify the user creation using the <a href=\"https:\/\/maketecheasier.com\/what-is-grep-and-uses\/\">grep command<\/a>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep \/etc\/passwd<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"191\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/create-and-verify-user-800x191.png\" alt=\"Create And Verify User\" class=\"wp-image-859097\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/create-and-verify-user-800x191.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/create-and-verify-user-400x95.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/create-and-verify-user.png 894w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adduser-command\">Creating Users With the adduser Command<\/h2>\n\n\n\n<p>The <code>adduser<\/code> command is a Perl script that will create a user similar to the <code>useradd<\/code> command. What makes it different is that it is an interactive command that prompts you to set the password, the home directory path, etc. On some distributions, such as Red Hat and CentOS, <code>adduser<\/code> is a symbolic link to <code>useradd<\/code>, and on other distributions like Arch Linux, adduser comes as a package that is not installed by default.<\/p>\n\n\n\n<p>By default, using this command creates a group for the user with the same name as the user\u2019s login. Other default settings are typically stored in the &#8220;\/etc\/default\/useradd&#8221; file. In this file, you can configure defaults for users created with <code>useradd<\/code>, such as the default shell, home directory location, and other account properties.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"421\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/configure-defaults-for-user-800x421.png\" alt=\"Configure Defaults For User\" class=\"wp-image-859098\" title=\"linux-useradd-conf\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/configure-defaults-for-user-800x421.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/configure-defaults-for-user-400x211.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/configure-defaults-for-user.png 1020w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Run the following command to create a new user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo adduser testuser<\/code><\/pre>\n\n\n\n<p>When creating a user, you will be prompted to set and confirm the password, provide optional user information, and confirm the account creation.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"425\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/create-user-using-adduser-800x425.png\" alt=\"Create User Using Adduser\" class=\"wp-image-859099\" title=\"linux-adduser\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/create-user-using-adduser-800x425.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/create-user-using-adduser-400x212.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/create-user-using-adduser.png 1013w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"change-user-passwords\">Setting or Changing User Passwords<\/h2>\n\n\n\n<p>After creating a user account, you can set or update the <a href=\"https:\/\/maketecheasier.com\/manage-user-password-linux\/\">user&#8217;s password<\/a> using the <code>passwd<\/code> command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo passwd<\/code><\/pre>\n\n\n\n<p>This command prompts you to enter and confirm a new password. If a regular user runs the <code>passwd<\/code> command without <code>sudo<\/code>, they can only change their own password.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"168\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/set-update-password-800x168.png\" alt=\"Set Update Password\" class=\"wp-image-859102\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/set-update-password-800x168.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/set-update-password-400x84.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/set-update-password.png 893w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Password complexity requirements are enforced by PAM and are typically configured in &#8220;\/etc\/pam.d\/common-password&#8221; on Ubuntu. For more information on updating password complexity rules, see the pam-auth-update man page.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"458\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-pam-auth-man-800x458.png\" alt=\"Linux Pam Auth Man\" class=\"wp-image-859110\" title=\"linux-pam-auth-man\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-pam-auth-man-800x458.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-pam-auth-man-393x225.png 393w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-pam-auth-man-786x450.png 786w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-pam-auth-man-788x451.png 788w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/linux-pam-auth-man.png 1015w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"usermod-command\">Managing Linux Users Using the usermod Command<\/h2>\n\n\n\n<p>You can use the <code>usermod<\/code> command to modify existing user accounts. It can change attributes such as user IDs, login names, home directories, or group memberships. For example, the following command updates the user&#8217;s UID:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -u<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"165\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/change-uid-usermod-800x165.png\" alt=\"Change Uid Usermod\" class=\"wp-image-859115\" title=\"linux-usermod-man\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/change-uid-usermod-800x165.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/change-uid-usermod-400x83.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/change-uid-usermod.png 900w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Be careful when modifying critical attributes such as the user ID or login name. Changing these values may affect file ownership or permissions on the system.<\/p>\n\n\n\n<p>Similarly, you can change a user&#8217;s Home Directory with the <code>usermod<\/code> command as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -d<\/code><\/pre>\n\n\n\n<p>In addition to this, you can lock or unlock a user account using the <code>-L<\/code> and <code>-U<\/code> options respectively:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -L<br>sudo usermod -U<\/code><\/pre>\n\n\n\n<p>Finally, you can set the account&#8217;s expiration date using the <code>--expiredate<\/code> option with the <code>usermod<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod --expiredate<\/code><\/pre>\n\n\n\n<p>These options allow you to control account access and manage user settings without deleting the account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adding-users-to-grou\">Adding Users to the Groups<\/h2>\n\n\n\n<p>Groups allow multiple users to share the same permissions. For example, users may need group access to manage files, run services, or perform administrative tasks.<\/p>\n\n\n\n<p>To <a href=\"https:\/\/maketecheasier.com\/add-users-to-groups-linux\/\">add a user to a group<\/a>, run the usermod command with <code>-a<\/code> and <code>-G<\/code> options:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -a -G<\/code><\/pre>\n\n\n\n<p>The <code>-a<\/code> flag means append, which ensures the user keeps their existing groups. Without this option, the command may overwrite the user&#8217;s group list.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"159\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/add-user-to-a-group-800x159.png\" alt=\"Add User To A Group\" class=\"wp-image-859126\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/add-user-to-a-group-800x159.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/add-user-to-a-group-400x80.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/add-user-to-a-group.png 940w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Alternatively, you can use the <code>gpasswd<\/code> command to add\/remove a user to\/from a group.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo gpasswd -a username groupname<\/code><\/pre>\n\n\n\n<p>To remove a user from a group:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo gpasswd -d username groupname<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"removing-users\">Removing Users<\/h2>\n\n\n\n<p>If a user account is no longer needed, you can remove it using the <code>userdel<\/code> command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo userdel username<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"96\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/delete-user-800x96.png\" alt=\"Delete User\" class=\"wp-image-859129\" title=\"linux-userdel-man\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/delete-user-800x96.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/delete-user-400x48.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/delete-user.png 865w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>This command deletes the user account but keeps the user&#8217;s home directory. To remove both the account and its home directory, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo userdel -r username<\/code><\/pre>\n\n\n\n<p>Note that <code>userdel<\/code> will not remove a user if there are active processes running under that account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"viewing-user-login-activity\">Viewing User Login Activity<\/h2>\n\n\n\n<p>Monitoring login activity helps administrators detect unauthorized access and troubleshoot authentication issues. On Ubuntu and Debian systems, login attempts are recorded in &#8220;\/var\/log\/auth.log&#8221;. You can view recent entries using the tail command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tail \/var\/log\/auth.log<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"342\" src=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-user-logs-800x342.png\" alt=\"View User Logs\" class=\"wp-image-859134\" srcset=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-user-logs-800x342.png 800w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-user-logs-400x171.png 400w, https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/view-user-logs.png 1020w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>On Red Hat or <a href=\"https:\/\/maketecheasier.com\/how-to-install-centos\/\">CentOS systems<\/a>, login records are stored in &#8220;\/var\/log\/secure&#8221;. Systems that use systemd may also allow viewing authentication logs using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo journalctl | grep ssh<\/code><\/pre>\n\n\n\n<p>This way, managing user accounts correctly keeps your system organized and prevents unauthorized access. To take your terminal experience even further, check out this guide on <a href=\"https:\/\/maketecheasier.com\/linux-terminal-tools\/\">Linux terminal tools<\/a> for utilities that make working in the terminal faster and more enjoyable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide covers managing Linux users from the terminal, including viewing and creating accounts, modifying users, and managing groups securely.<\/p>\n","protected":false},"author":15386,"featured_media":859156,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[403,5257,135,3104],"class_list":["post-274673","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-command-line","tag-linux","tag-terminal","tag-users"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Manage Users from the Command Line in Linux - Make Tech Easier<\/title>\n<meta name=\"description\" content=\"Learn how to manage Linux users from the command line, including creating, modifying, and securing accounts effectively.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Manage Users from the Command Line in Linux - Make Tech Easier\" \/>\n<meta property=\"og:description\" content=\"Learn how to manage Linux users from the command line, including creating, modifying, and securing accounts effectively.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"Make Tech Easier\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MakeTechEasierMTE\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-17T15:25:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/manage-users-linux.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Anees Asghar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@maketecheasier\" \/>\n<meta name=\"twitter:site\" content=\"@maketecheasier\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/\"},\"author\":{\"name\":\"Anees Asghar\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#\\\/schema\\\/person\\\/4d7cfd08a623d7333b2e7ce1a28f5c9b\"},\"headline\":\"How to Manage Users from the Command Line in Linux\",\"datePublished\":\"2026-03-17T15:25:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/\"},\"wordCount\":1119,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/maketecheasier.com\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/manage-users-linux.png\",\"keywords\":[\"command line\",\"Linux\",\"terminal\",\"users\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/\",\"url\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/\",\"name\":\"How to Manage Users from the Command Line in Linux - Make Tech Easier\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/maketecheasier.com\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/manage-users-linux.png\",\"datePublished\":\"2026-03-17T15:25:00+00:00\",\"description\":\"Learn how to manage Linux users from the command line, including creating, modifying, and securing accounts effectively.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/#primaryimage\",\"url\":\"https:\\\/\\\/maketecheasier.com\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/manage-users-linux.png\",\"contentUrl\":\"https:\\\/\\\/maketecheasier.com\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/manage-users-linux.png\",\"width\":1280,\"height\":720,\"caption\":\"Manage Users Linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/manager-users-linux-command-line\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/maketecheasier.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Computing\",\"item\":\"https:\\\/\\\/maketecheasier.com\\\/category\\\/computing\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Linux\",\"item\":\"https:\\\/\\\/maketecheasier.com\\\/category\\\/linux\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How to Manage Users from the Command Line in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#website\",\"url\":\"https:\\\/\\\/maketecheasier.com\\\/\",\"name\":\"Make Tech Easier\",\"description\":\"Uncomplicating the complicated, making life easier\",\"publisher\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/maketecheasier.com\\\/search\\\/{search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#organization\",\"name\":\"Make Tech Easier\",\"url\":\"https:\\\/\\\/maketecheasier.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/maketecheasier.com\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/mte-logo.png\",\"contentUrl\":\"https:\\\/\\\/maketecheasier.com\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/mte-logo.png\",\"width\":696,\"height\":84,\"caption\":\"Make Tech Easier\"},\"image\":{\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/MakeTechEasierMTE\",\"https:\\\/\\\/x.com\\\/maketecheasier\",\"https:\\\/\\\/www.instagram.com\\\/maketecheasier\\\/\",\"https:\\\/\\\/pinterest.com\\\/MakeTechEasier\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/Maketecheasier\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/maketecheasier.com\\\/#\\\/schema\\\/person\\\/4d7cfd08a623d7333b2e7ce1a28f5c9b\",\"name\":\"Anees Asghar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dfe6a38bb2c6a5cc3a1f50848abc478256aa0ee9cf6ab77c3117867c94df83b1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dfe6a38bb2c6a5cc3a1f50848abc478256aa0ee9cf6ab77c3117867c94df83b1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dfe6a38bb2c6a5cc3a1f50848abc478256aa0ee9cf6ab77c3117867c94df83b1?s=96&d=mm&r=g\",\"caption\":\"Anees Asghar\"},\"description\":\"Anees is a go-to expert of various technologies like Windows, Linux, Java, Python, and SQL. He has been contributing to the community through his words. A passion for serving the people excites him to craft primo content.\",\"url\":\"https:\\\/\\\/maketecheasier.com\\\/author\\\/aneesasghar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Manage Users from the Command Line in Linux - Make Tech Easier","description":"Learn how to manage Linux users from the command line, including creating, modifying, and securing accounts effectively.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/","og_locale":"en_US","og_type":"article","og_title":"How to Manage Users from the Command Line in Linux - Make Tech Easier","og_description":"Learn how to manage Linux users from the command line, including creating, modifying, and securing accounts effectively.","og_url":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/","og_site_name":"Make Tech Easier","article_publisher":"https:\/\/www.facebook.com\/MakeTechEasierMTE","article_published_time":"2026-03-17T15:25:00+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/manage-users-linux.png","type":"image\/png"}],"author":"Anees Asghar","twitter_card":"summary_large_image","twitter_creator":"@maketecheasier","twitter_site":"@maketecheasier","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/#article","isPartOf":{"@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/"},"author":{"name":"Anees Asghar","@id":"https:\/\/maketecheasier.com\/#\/schema\/person\/4d7cfd08a623d7333b2e7ce1a28f5c9b"},"headline":"How to Manage Users from the Command Line in Linux","datePublished":"2026-03-17T15:25:00+00:00","mainEntityOfPage":{"@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/"},"wordCount":1119,"commentCount":0,"publisher":{"@id":"https:\/\/maketecheasier.com\/#organization"},"image":{"@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/manage-users-linux.png","keywords":["command line","Linux","terminal","users"],"articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/maketecheasier.com\/manager-users-linux-command-line\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/","url":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/","name":"How to Manage Users from the Command Line in Linux - Make Tech Easier","isPartOf":{"@id":"https:\/\/maketecheasier.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/#primaryimage"},"image":{"@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/manage-users-linux.png","datePublished":"2026-03-17T15:25:00+00:00","description":"Learn how to manage Linux users from the command line, including creating, modifying, and securing accounts effectively.","breadcrumb":{"@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/maketecheasier.com\/manager-users-linux-command-line\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/#primaryimage","url":"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/manage-users-linux.png","contentUrl":"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/11\/manage-users-linux.png","width":1280,"height":720,"caption":"Manage Users Linux"},{"@type":"BreadcrumbList","@id":"https:\/\/maketecheasier.com\/manager-users-linux-command-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/maketecheasier.com\/"},{"@type":"ListItem","position":2,"name":"Computing","item":"https:\/\/maketecheasier.com\/category\/computing\/"},{"@type":"ListItem","position":3,"name":"Linux","item":"https:\/\/maketecheasier.com\/category\/linux\/"},{"@type":"ListItem","position":4,"name":"How to Manage Users from the Command Line in Linux"}]},{"@type":"WebSite","@id":"https:\/\/maketecheasier.com\/#website","url":"https:\/\/maketecheasier.com\/","name":"Make Tech Easier","description":"Uncomplicating the complicated, making life easier","publisher":{"@id":"https:\/\/maketecheasier.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/maketecheasier.com\/search\/{search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/maketecheasier.com\/#organization","name":"Make Tech Easier","url":"https:\/\/maketecheasier.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/maketecheasier.com\/#\/schema\/logo\/image\/","url":"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/03\/mte-logo.png","contentUrl":"https:\/\/maketecheasier.com\/wp-content\/uploads\/2025\/03\/mte-logo.png","width":696,"height":84,"caption":"Make Tech Easier"},"image":{"@id":"https:\/\/maketecheasier.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MakeTechEasierMTE","https:\/\/x.com\/maketecheasier","https:\/\/www.instagram.com\/maketecheasier\/","https:\/\/pinterest.com\/MakeTechEasier","https:\/\/www.youtube.com\/c\/Maketecheasier"]},{"@type":"Person","@id":"https:\/\/maketecheasier.com\/#\/schema\/person\/4d7cfd08a623d7333b2e7ce1a28f5c9b","name":"Anees Asghar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dfe6a38bb2c6a5cc3a1f50848abc478256aa0ee9cf6ab77c3117867c94df83b1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dfe6a38bb2c6a5cc3a1f50848abc478256aa0ee9cf6ab77c3117867c94df83b1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dfe6a38bb2c6a5cc3a1f50848abc478256aa0ee9cf6ab77c3117867c94df83b1?s=96&d=mm&r=g","caption":"Anees Asghar"},"description":"Anees is a go-to expert of various technologies like Windows, Linux, Java, Python, and SQL. He has been contributing to the community through his words. A passion for serving the people excites him to craft primo content.","url":"https:\/\/maketecheasier.com\/author\/aneesasghar\/"}]}},"_links":{"self":[{"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/posts\/274673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/users\/15386"}],"replies":[{"embeddable":true,"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/comments?post=274673"}],"version-history":[{"count":1,"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/posts\/274673\/revisions"}],"predecessor-version":[{"id":859286,"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/posts\/274673\/revisions\/859286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/media\/859156"}],"wp:attachment":[{"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/media?parent=274673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/categories?post=274673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/maketecheasier.com\/wp-json\/wp\/v2\/tags?post=274673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}