Your cart is currently empty!
How to fix adduser command not found
If you’re trying to create a new user on your Linux system and you run into the “adduser: command not found” error, don’t worry—you’re not alone. This is a common issue, especially on minimal or custom installations. Here’s how to get past it and back to work.
What’s Going On?
The adduser
command is a friendly script that makes creating new users easier. If your system can’t find it, it’s usually because the tool isn’t installed. Some Linux distributions (especially server versions or containers) come with only the basics, so extra utilities like adduser
aren’t included by default.
Quick Solution: Install adduser
The fix is straightforward: install the package that provides adduser
. Here’s how you do it, depending on your Linux distribution.
For Debian, Ubuntu, and Derivatives:
sudo apt update
sudo apt install adduser
For CentOS, Fedora, RHEL:
On these systems, you might want to use useradd
(which is more basic but does the job), because adduser
might not be available or could be a symbolic link to useradd
.
sudo yum install util-linux-user
or
sudo dnf install util-linux-user
Note:
Ifadduser
is still missing, useuseradd
instead. The syntax is slightly different, but it works:
sudo useradd newusername
sudo passwd newusername
Still Not Working?
If you’ve installed adduser
but still get the error, check your PATH:
echo $PATH
The output should include /usr/sbin
and /usr/bin
. If not, you might need to run:
export PATH=$PATH:/usr/sbin:/usr/bin
Or log in as root:
sudo -i
Summary
The “adduser: command not found” error just means the utility isn’t installed or your environment can’t see it. A quick install, or using useradd
, will get you back on track.
Need more Linux fixes or tips? Leave a comment below!
Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!