Apt – PacMan – Yum

I’ve worked with several package mangers, on several different distros. However my exposure to them has been limited by the popularity of Apt. That isn’t to say my primary OS only has one, as that would be an understatement. Ubuntu actually comes packaged with two package managers, Apt, and dpkg. And they are all kinds of different.

Apt is a high level package manger, while dpkg is a low level package manger. All this means is that Apt handles a varying degree of tasks, and dpkg is only concerned with the ones right in front of it.

For example, when you install an application with Apt your computer will search for the installation media on the server, find its dependencies, and ask for confirmation before installing them, while giving you details of conflicts.

Dpkg on the other hand will not download the media, it won’t download the dependencies, and it won’t ask confirmation nor search for conflicts. It might not even tell you that you are missing the dependencies.
Continue reading

Add a User on Ubuntu Server

Ubuntu Server is like any Linux variety, and has full multi-user capabilities, and a common task on any server is adding users.

useradd

The useradd command will let you add a new user easily from the command line:

useradd

This command adds the user, but without any extra options your user won’t have a password or a home directory.

You can use the -d option to set the home directory for the user. The -m option will force useradd to create the home directory. We’ll try creating a user account with those options, and then use the passwd command to set the password for the account. You can alternatively set a password using -p on the useradd command, but I prefer to set the password using passwd.

sudo useradd -d /home/testuser -m testuser
sudo passwd testuser

adduser

The adduser command is even easier than the useradd command, because it prompts you for each piece of information. I find it slightly funny that there are two virtually identically named commands that do the same thing, but that’s linux for you. Here’s the syntax:

adduser