Create A New User In Linux

If you’re familiar with Linux, you’ll already know that Linux is a multiuser system and today we’ll learn how to create a new user in Linux. This shouldn’t be a very complicated article. In some more advanced operations, you may be required to create a new user. This article will be about that.

If you aren’t already aware, you have a whole lot of users on your Linux system. You have more users than just your user account and certain things can be done by certain users. You can generally use an elevated account (or sudo) to overcome those user restrictions.

There may come a time when you want to share your device with another person. So, there’s another reason to create an additional user. If you’re managing a server with multiple users, there’s another reason to create a new user in Linux. There are any number of reasons why you’d like to create a new user and we’ll go over that process today.

We’ll just be using a couple of tools today. It’s not complicated.

useradd:

The main tool we’ll be using is the useradd command. This is a tool that’s certainly installed by default on any major distro. It’s a part of the basic building blocks we use to manage Linux, so this doesn’t require any installation. You can verify that you have useradd available with the following command:

The output should be:

If you check the man page, you’ll see this:

useradd – create a new user or update default new user information

So, as our goal is to create a new user, you can see that this is the correct tool for the job. I can’t think of a better tool for the job, as it should do everything behind the scenes as well.

passwd:

We’ll also be using the passwd command. This isn’t strictly necessary, but it’s in your best interest to set a user’s password. Once again, you won’t need to install anything and the following command will confirm that:

The output should match this output:

The text alone should let you know that this is a tool for setting passwords, but you can always refer to the man page to learn more. This is how passwd is described:

passwd – change user password

As I said, you don’t have to undergo this step but it’s in your best interests, from a security standpoint, to assign passwords to users who have any access to your system. And, as you can see, this is the right tool for the job of setting a user’s password.

Create A New User In Linux:

Of course, this is done in the terminal. As a general rule, you can press CTRL + ALT + T and your default terminal should open. That’s a fairly common shortcut that I mention often. You can also find a terminal in your application menu, pretty much regardless of which desktop environment you’re using and whichever Linux you’re using.

Creating The New User:

With your terminal now open, you’ll need to use elevated privileges, and the syntax is quite simple. To create a new user in Linux, the syntax follows:

This should be lowercase as Linux doesn’t like capital letters in usernames. So, for my username, the command would look like this:

You can confirm that you’ve added the user with the following command:

For example:

With your user firmly in place, you should set a password. Let’s do that next.

Set A Password For Your New User:

You’re almost always going to want a password for your new user. That’s easily done and also requires elevated permissions. You’ll need to continue using the terminal when you want to set a new password for the user.

The syntax for setting a password for your new user is as follows:

After you authenticate, the system will have you type in the password twice. It does this to ensure you’ve not made a mistake while typing, though it could be that you’ve made the same mistake twice.

So, be careful with this step. Otherwise, you have to find some way to reset the new user and the quickest way to do that would be to delete the user and start again.

Closure:

Yeah, I guess this counts as a short article. My most recent articles have been longer than this one. This one is about the length of my earliest articles, maybe slightly longer. The site has evolved!

Anyhow, you’ve learned how to create a new user in Linux. It shouldn’t matter which distro you’re using. The kernel you’re using shouldn’t impact this at all. It shouldn’t even matter what shell you’re using, this should simply work. If you want to create a new user, this is how you do it.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

I’ll Try To Answer The Question, “Should I Use Linux?”

Should you use Linux? That is the question! In fact, it’s an important question and one that I’ve wanted to try to answer for a while. I use Linux, after all, so shouldn’t you? The conclusion might surprise you. No, really, it might. I don’t want it to seem like clickbait – but read on!

As I sit here watching the 2020 (technically 2021) Olympics in Tokyo, I’m reminded of a few things. First among those things is that I’m not really all that into sports, and secondly that sports make good analogies. As I watch the Olympics, I’m seeing some similarities.

On one end, you have the casual fan – the person watching on television simply because it’s moving pictures and sound. They recognize most of the sports and maybe even know some of the rules to some of the events. They might know that hands get limited use in soccer, but have no idea how to score gymnastic’s floor events.

On the other end, you have the people standing on the podiums at the end of events because they’ve devoted their entire lives to mastering the skills required to get them there. They are the absolute greatest players at the time and worked their asses off to get there. They’ve devoted their lives to getting on the podium.

Between all this, there’s a huge spectrum. There are those who are fans of a single event, maybe having competed themselves at a much lower level. There are the fans that also head weekly to the Rec. Center to play pick-up games, organized tournaments, regional tournaments, or even compete at the national level without any chance of ending up at the Olympics – and they’re okay with that.

Sports? WTF?

To put that into Linux-terms, on one end you have the person that’s tinkered with Linux in a virtual machine or a live install, having never converted to Linux entirely. And, on the opposing end of the spectrum, you have the person that devotes 40+ hours maintaining the kernel. (If you’re new to Linux, trust me when I say that’s a very important job.)

It works for the opensource software as well. On one end, you have the person who uses LibreOffice once or twice a month. In the middle you have the person who has set up their small company with LibreOffice being the integrated suite of choice. At the other end, you have the developer’s spending 8 hours a day trying to fix bugs while trying to add new features.

Just like the Olympics, there are tons of ‘events’ in Linux. Each event can be a single piece of software or software that performs a specific function. You can be a fan of that single piece of software – and a fan completely along the spectrum, from a casual fan to someone that spends considerable time making that software better.

It’s entirely up to you to determine where you want to be on the spectrum. Just like the Olympics, it’s very much a meritocracy. The system rewards ability. Those that have the ability and desire make it at the top – maybe even turning it into a paid gig. Also true, is that if you lack the ability, you need only show some initiative and you’ll find people willing to ‘coach’ you.

If you want to learn how to triage bugs, program, or answer support questions for your favorite project, someone will help you learn to do those things – just like coaches. How much effort and time you put into it are going to be the strongest indicators of how far you can go. Keep at it long enough, and if it’s your objective, you too can help maintain the kernel. You too can help influence the directions your favorite distro moves.

On top of all that, you can start your own sport (write your own software) and, if enough people like it and it does the job better than other applications, you too can end up at the top – like the IOC deciding to add new events to the games. The last time I paid any attention to the games, skateboarding was not an event. These days there are numerous skateboarding events. In this case, skateboarding got popular and was recognized as taking skill to perform at the highest levels. So too goes software.

If you are enjoying this article, you might also like to click and learn which distro is the best distro. It’s similar writing to this.

Decide To Use Linux:

So, what does the above have to do with helping you decide if you should use Linux?

Well, for starters, nobody is competing in the 1500 meter swimming events because they hate Microsoft. They’re competing at the Olympics because they’re passionate about their sport, not because they dislike the business practices of Apple. They’re competing because they’re passionate about their event.

You shouldn’t use Linux because you dislike something, you should use Linux because it works. You should use Linux because it suits your needs, because it fills a role in your life as a tool, or you should use Linux because you’re passionate about the things it provides, be it a service or a liberty.

When you decide to use Linux, you should also start figuring out how far you want to take it. Do you care enough to try to make it to the top, or do you just want to be an end user? Do you want to help make Linux (or an application) better for people, or do you just want to use applications to get your work done?

Use Linux because you’re intellectually curious, or because you value the freedoms it provides. Use Linux because you want to reach the top of the mountain, not because you want someone to guide you there. Make the choice to use Linux not because dislike Windows, but because you like Linux. Decide to commit to a life of learning, and switch to Linux.

Maybe Don’t Use Linux:

We see it time and time again. Someone decides to use Linux because they ‘hate’ Microsoft. In the greatest computer irony ever, they revert to using Windows because Linux didn’t act like Windows and they didn’t want to put in the effort to learn. They do not end up as Linux users. Linux isn’t for everyone, and that’s okay. Neither is table tennis or competing in a triathlon. 

If you’re unwilling to put the effort into understanding the game, it’s probably not going to be all that interesting to watch it. When you don’t put in the effort to learn to make Linux work, it doesn’t mean that Linux sucks. It means you just didn’t put in the effort to learn.

Linux has gotten easier. For the most part, it just works. But, no… No, it’s not for everyone. Not everyone should use Linux. There won’t ever be a “Year of Linux on the Desktop” because of so many reasons – chief among them is because Linux isn’t for everyone. Not everyone wants to reinvest the time they spent learning one operating system into learning a new operating system. Not everyone can reinvest that time.

Over the years, I’ve seen thousands of people claim they were going to switch to Linux. Those that say they’re going to do so because they hate something are less likely to stick around than those who say they’re switching because they like something about Linux. The ones that post first posts about how they’re intellectually drawn to learning how it works are the ones that are still there five years down the road, often helping new people learn the ropes.

The others run into a hurdle and try to solve it like it’d be solved in Windows. When that doesn’t work, they give up. They’ll keep trying it the Windows way and keep getting frustrated. At best, you can spoon feed them commands for a few months before they disappear from the support forums forever.

Instead of trying to make it to the Olympics, they give up when they realize it takes practice and dedication. At the first big stumbling block, they quit. For reasons of their own, they don’t dedicate the time to learn to use Linux. They don’t even make it to the point of being a casual fan.

Who Should Use Linux:

You should use Linux if you’re willing to put the effort in to reach your Linux goals. Your goal doesn’t have to be becoming a kernel maintainer. Your goal may just be becoming a bog-standard end-user with a stable system. Both are fine goals and the latter requires much less effort. Both require effort, however.

If you are willing to put the effort in, then use Linux. When you’re curious about how your computer works, want to customize your experience, or appreciate the things Linux brings to the table, then use Linux! When you want the freedom offered with FOSS, jump on the Linux bandwagon. If you have a goal and you can use Linux to reach that goal, do it!

Again, use Linux because you’re passionate about it – or at least willing to put the effort in to learn how to use it. You need to be willing to read help pages. Searching for help is one of the greatest Linux skills you can learn – search engines are a great help. But, use Linux because you want to learn something different, not because you hate something else. You have to be willing to learn! If you do not learn, you will not succeed.

Even at the most basic level of Linux, it requires a willingness to learn – and to “unlearn” what you learned with your previous computer experience. The person who should be using Linux is the kind of person that values knowledge and understanding. You should be the kind of person that expects the best from yourself and the kind of person willing to put the time in to be exactly that. 

In other words, you should be somewhere along the spectrum that is the Olympics. From dedicated fan to standing on the podium with a medal on your chest, there’s room for all. You don’t have to aim for gold – you can just aim for understanding how the game works. Aiming to be a kernel developer isn’t a requirement, but a willingness to learn how the kernel works will help you truly appreciate and use Linux.

Closure:

I’ve been wanting to write this for a while, but couldn’t ever think of a way to start it, nor could I think of a way that’d not be too preachy. I realize this still comes off as a bit elitist, but pretty much anyone can learn to use Linux well enough to be an end user. It’s not that hard and it only requires a little bit of effort. At the same time, for those that want to put the effort in, the sky is the limit and the proverbial podium awaits.

I kinda like the essay format, but I worry that it is too long for people to read. There are some potential multi-part articles that I’d like to challenge. My goal has been short bites of data that help you become a more proficient Linux user, or something like that. However, there’s room for more than that and the readership varies in preferences. We shall see what happens.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.