How to Add and Remove Users on Ubuntu 20.04

When provisioning a new Ubuntu system, the main task to be done is adding and removing users. Each user can have various permission levels and specific settings for different command-line and GUI applications.

So in this article, we have explained how to add and remove user accounts on Ubuntu 20.04

Before we start

Let us see some points.

Only root or users with sudo rights can create and remove users.

The following two ways are used to create new users:

  1. From the command line.
  2. Through the GUI.

Adding a User from the Command Line

In Ubuntu, there are a couple of command-line tools that you can do to create a new user account that is useradd and adduser.

useradd is a low-level utility. adduser is a script written in Perl that works as a friendly interactive frontend for useradd.

It is swift and easy to add a new user. Entreat the adduser command accompanied by the username. For example, to produce a new user account named username, you would work on the subsequent command

$ sudo adduser username
Output

Adding user `username '...

Adding new group `username' (1001) ...

Adding new user `username' (1001) with group `username' ...

Creating home directory `/home/username' ...

Copying files from `/etc/skel' ...

You will be examined a series of problems. Enter and validate the new user password. Answering all other questions is voluntary.

Output: 

Enter new UNIX password: 

Retype new UNIX password: 

passwd: password updated successfully

Changing the user information for username

Enter the new value, or press ENTER for the default

Full Name []: 

Room Number []: 

Work Phone []: 

Home Phone []: 

Other []: 

Is the information correct? [Y/n]

In the end, you will be required to confirm that the information you typed is accurate or not

The command will generate the new user’s home directory and copy files from /etc/skel to it. Inside the home directory, the user can write, edit, and delete files and directories which they want.

If you need the new user to be capable of performing administrative tasks, you require to add the user to the sudo group :

$ sudo usermod -aG sudo username

Adding a User through the GUI

If you are not satisfied with the command line, you can add a new user account through the GUI also. To do so, you will need to follow the steps given below:

  1. The first step is to open the settings window and click on the “Users” tab.
  2. Then you will need to click on the “Unlock” button and open your user password when mentioned.
  3. After you enter the password, the “Unlock” button will convert to a green “Add User” button.
  4. Then you will need to click on the “Add User” button, and then Add user dialog will arrive:
  5. Then you will need to select whether the new user should be a standard or administrator user and insert information. Once done, then you will need to click on the “Add” button.

Removing a User from the Command Line

The following two commands are used in Ubuntu to delete a user account: userdel and its interactive frontend deluser.

To delete the user, request the deluser command and pass the username as the argument:

$ sudo deluser username

The above command will not remove the user files.

If you need to delete the user and its home directory and mail spool, use the –remove-home flag command for a better result.

 Removing a User through the GUI

  1. The first step is to open the settings window and click on the “Users” tab.
  2. Then click on the “Unlock” button, and insert your user password when mentioned.
  3. Then click on the username which you want to delete, and you will observe a red “Remove User..” button on the base right corner, which indicated that the user could be removed.
  4. Then click the “Remove User..” button, and you will be mentioned whether to keep or delete the user home directory. By clicking on one of those buttons removes the user that you are willing to do.

Conclusion:

In this article, you have determined how to add and remove users in Ubuntu 20.04. Understanding how to add and remove users is one of the essential skills a Linux user should know.

How to Add and Delete Users on Ubuntu 18.04

Ubuntu is also a multi-user operating system like any other Linux distribution. Each user can have various permission levels and unique settings for different command-line and GUI applications.

Understanding how to add and remove users is one of the necessary skills a Linux user should know, as it is the primary task.

In this article, we will explain to you how to add and remove users on Ubuntu 18.04.

To be able to create and remove users, you require to be logged in as root or user with sudo perquisites.

How To Add User in Ubuntu

You can create a new user account in Ubuntu in two ways, which are as follows:

  1. From the command line.
  2. Through the GUI.

Add a New User from the Command Line

Two command-line tools can create a new user account that is useradd and adduser tool in Ubuntu.

Where useradd is used as a low-level utility for adding users, while the adduser a friendly interactive frontend to useradd written in Perl language.

To create a new user account named username using the adduser command, you would run:

$ sudo adduser username
Output:

Adding user `username'...

Adding new group `username' (1001) ...

Adding new user `username' (1001) with group `username' ...

Creating home directory `/home/username' ...

Copying files from `/etc/skel' ...

You will be asked a series of questions. The password is required, and all other fields are optional.

Output:

Enter new UNIX password: 

Retype new UNIX password: 

passwd: password updated successfully

Changing the user information for username

Enter the new value, or press ENTER for the default

Full Name []: 

Room Number []: 

Work Phone []: 

Home Phone []: 

Other []: 

Is the information correct? [Y/n]

Finally, if you want to confirm that the information is correct then enter Y.

The command will create the new user’s home directory, copy files from the/etc/skel directory to the user’s home directory. Within the home directory, the user can write, edit, and delete files and directories.

By default, on Ubuntu, members of the group sudo are granted with sudo access.

If you want the newly created user to have administrative rights, add the user to the sudo group :

 $ sudo usermod -aG sudo username

Add a New User through the GUI

If you are not satisfied with the command line, you can add a new user account through the GUI also. To do so, you will need to follow the steps given below:

  1. The first step is to search for “users” in the activation screen and then click on “Add or remove users and remember to change your password.”
  2. Then you will need to click on the “Unlock” button and open your user password when mentioned.
  3. After you enter the password, the “Unlock” button will convert to a green “Add User” button.
  4. Then you will need to click on the “Add User” button, and then Add user dialog will arrive:
  5. Then you will need to select whether the new user should be a standard or administrator user and insert information. Once done, then you will need to click on the “Add” button.

How To Delete a User

If the user account is no longer in use, then you can delete it each from the command line or GUI, whichever is preferred.

Delete a User from the Command Line

Two command-line tools can create a new user account that is userdel and deluser tool in Ubuntu. Where useradd is used as a low-level utility for adding users, while the adduser a friendly interactive frontend to useradd written in Perl language and it is more preferred to use.

To delete the user, without removing the user files, run:

$ sudo deluser username

The following command is used if you want to delete the user and its home directory and mail spool, use the –remove-home flag:

$ sudo deluser –remove-home username

Delete a User through the GUI

  1. The first step is to search for “users” in the activation screen and then click on “Add or remove users and remember to change your password.”
  2. Then click on the “Unlock” button, and insert your user password when mentioned.
  3. Then click on the username you want to delete, and you will observe a red “Remove User..” button on the base right corner, which indicated that the user could be removed.
  4. Then click the “Remove User..” button, and you will be mentioned whether to keep or delete the user home directory. By clicking on one of those buttons removes the user that you are willing to do.

Conclusion

In this article, you have learned how to add and remove users in Ubuntu. If you have any queries related to this topic, you can leave comments below.

How to Install Plex Media Server on Ubuntu 18.04

In the following write-up, we will try to get ourselves acknowledged how to get the Plex media server installed on Ubuntu 18.4 and create a Media library.

What is Plex?

Plex is considered the server used for streaming different kinds of media like video, music, and photo slideshow. The part about Plex that makes it the most unique is that you can stream through it from anywhere and everywhere you want to.

Point to remember

One thing that should be noted is to be able to install different servers on Ubuntu. You should be logged in as a user.

Let’s get started with the installing procedure of the Plex Media Server.

One can easily manage the Plex media server on Ubuntu by using the official repository by Plex. This procedure does not need you to be technically efficient and help you limit 20 minutes by installing and configuring the Plex media server.

The steps mentioned below will help you with the process of installing Plex media server in Ubuntu,

  • the first step will be to import the repository’s GPG key and use the below-mentioned command,
$ curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
  • Secondly, you will have to add your system software repository list with Plex APT repository:
$ Echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
  • when you are done with enabling the blacks repository, you are now ready to install the Plex media server in the latest version,
$ sudo apt install apt-transport-HTTPS

$ sudo apt update

$ sudo apt install plexmediaserver
  • Verification of the proper functioning of flex service can be done by the command below,
$ sudo systemctl status plexmediaserver

You will receive a output mirroring exactly the below mentioned,

  • plexmediaserver.service – Plex Media Server for Linux

Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)

Active: active (running) since Mon 2018-06-25 10:42:28 PDT; 35min ago

Process: 2544 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)

Main PID: 2556 (sh)

         Tasks: 56 (limit: 2321)

CGroup: /system.slice/plexmediaserver.service

Plex Media Server Configuration

Follow the steps below to configure the Plex media server,

  • the first step in configuring the Plex media server is creating directories, which will further help store media files.
sudo mkdir -p /opt/plexmedia/{movies,series}

The location of the media files does not matter but remember to provide the proper ownership.

sudo chown -R plex: /opt/plexmedia
  • Finally, we reached the server configuration step where, on typing the browser search bar with, http://YOUR_SERVER_IP:32400/web, aired, and aired in a screen popup with a Plex media sign up.

Methods describing how to sign in on Plex Media Server

Keep the steps below in mind to sign-in on the Plex media server,

The first step to bring in use the Plex media server is to get yourself an account created.

Account creation is no big deal. You will have to fill in the information on Google, Facebook, or email about yourself and if you are a fan of premium, then get yourself a Plex Pass.

Plan.

When undergone, the procedure of signing up an informative page will pop-up regarding the working of Plex.

From here, to move ahead, you will have to press the button flashing “Got it.”

  • Secondly, you will be given an option to decide the media’s access to your server when outside the home (server’s home box). After putting a check on it, you will go for the “Next” button. In this procedure, you will also find yourself naming your Plex server.

The check procedure follows with you to the creation of a Media library. You will have to press down on, “Add Library” button, and voila!

You can have your selected movies and library type mentioned. This step is again followed by pressing on the “Next” button.

  • Another step involved making a media folder path directed, which will lead you to the media files easily. We had the path directed as,

/opt/plex media/granule/movies.

  • To increase the number of libraries, you have to click the “Add” button simultaneously and then the “Add Library” one.
  • Following a click on the “Next” button, and after a click on the button displayed as “Done,” and you will reach the Plex Web dashboard.
  • Once you are done setting up everything, you can now feel free to explore Plex media and the different options.

Conclusion

This write-up provided above helped you understand the Plex media server’s installing procedure when it comes to Ubuntu 18.4 machine. Also, you got yourself some tricks and tips on serving your own Media Library.

How to Install Nvidia Drivers on Ubuntu 20.04

In this article, you will learn how to install the NVIDIA drivers on Ubuntu 20.04.

If you have an Ubuntu machine with an NVIDIA GPU, you can take between the open-source driver Nouveau and NVIDIA’s exclusive drivers. By default, Ubuntu applies Nouveau drivers frequently much slower than the exclusive drivers and lacks support for the most advanced hardware and software technology.

Installing NVIDIA drivers on Ubuntu is a simple task that can be completed in less than a minute. Ubuntu involves a tool that can recognize the graphics card model and install the relevant NVIDIA drivers. Alternatively, you can download and install the drivers from the NVIDIA site also.

Installing the NVIDIA Drivers Using a GUI

This is the most relaxed and the suggested way to install NVIDIA drivers on Ubuntu Desktop systems.

  1. In the Activities screen, seek “driver” and click on the “Additional Drivers” icon.
  2. The “Software & Updates” window will start to see all available drivers for your graphic card.
  3. Depending on the installed card, you will be offered a list of one or more NVIDIA drivers.
  4. Choose the NVIDIA diver you need to install and then click on the “Apply Changes” button.
  5. The installation process may take a few minutes, so be patient.
  6. Once the drivers and installed, then you will need to reboot your machine.

The new NVIDIA driver will be activated after the system is boot up. If you need to view or change the driver set, begin the Nvidia-settings utility:

$ sudo Nvidia-settings

Later, if you need to update or modify the driver, repeat the same steps.

Installing the NVIDIA Drivers Using the Command-Line

If you favor the command-line interface, you can use the ubuntu-drivers tool.

Open your terminal (Ctrl+Alt+T), and run the subsequent command to get data about your graphic card and open drivers:

$ ubuntu-drivers devices

The output following shows that this system has “GeForce GTX 1650,” and the suggested driver is “Nvidia-driver-440”. You may see various outcomes depending on your system.

Output:

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F95sv00001028sd0000097Dbc03sc02i00
vendor   : NVIDIA Corporation
model    : TU117M [GeForce GTX 1650 Ti Mobile]
driver   : nvidia-driver-440 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Usually, it is best to install the suggested driver. To do so, use the apt package manager:

$ sudo apt install Nvidia-driver-440

Once the installation is finished, reboot your system:

$ sudo reboot

When the system is back, you can view the status of the graphic card using the Nvidia-smi monitoring tool:

 $ Nvidia-smi

The command will represent the version of the used driver and other data about the NVIDIA card:

Output:

Wed Nov 11 22:45:21 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 165...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   41C    P3    14W /  N/A |      4MiB /  3914MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2323      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

Installing the Latest NVIDIA Drivers

Most users should stick with the firm NVIDIA drivers that are available in the default Ubuntu repositories. If you want to live on the edge, you can install the latest drivers from the NVIDIA site or the “Graphics Drivers” PPA.

We will use the PPA method as it is more comfortable to install and update the drivers.

Add the PPA repository using the following command:

$ sudo add-apt-repository ppa:micahflee/ppa

Use the ubuntu-drivers tool to view the available drivers:

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F95sv00001028sd0000097Dbc03sc02i00
vendor   : NVIDIA Corporation
model    : TU117M [GeForce GTX 1650 Ti Mobile]
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-450-server - third-party non-free
driver   : nvidia-driver-455 - third-party non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Install the desired driver:

$ sudo apt install nvidia-driver-455

Reboot the system to activate the new driver.

Conclusion

In this article, you have learned how to install NVIDIA Driver on Ubuntu 20.04. If you want more information about NVIDIA drivers, then you can contact us now.

How to Install Eclipse IDE on Ubuntu 18.04

Eclipse is the most commonly used Java built-in programming environment (IDE). It is easy to use via plugins. Its versions are available for development in other programming language platforms like C++, JavaScript, and PHP.

The Eclipse installation kit (version 3.8.1) included in the Ubuntu repository is out of date. The best way to update the new Eclipse IDE on Ubuntu 18.04 is to use the snappy packaging system.

Install the Eclipse

The new stable edition of Eclipse is Eclipse 2019-03, is available now:

To install Eclipse on your Ubuntu system, follow the following steps:

Java Install

Since Eclipse is an IDE based on Java, you will need the Java Runtime Environment (JRE) to be installed to run it.

Run the commands below to install the Java opensource update.

sudo apt update
Sudo apt configuration default-JRE

Java JRE has to be mounted.

Download and install the Eclipse Snap kit to your machine by typing:

sudo snap install --classic Eclipse

When you install Eclipse successfully, you should see the following output:

eclipse 2019-03 from Snapcrafters installed

Eclipse Manually Install

The steps below should be helpful for those who want to install Eclipse manually. You’ll be using the regular Eclipse installer to install the app.

Firstly, to download the installer, go to the page below.

https://www.eclipse.org/downloads/downloads/downloads/

Or you can use the download and extract commands below.

Run the following commands to remove the downloaded file from your Home Directory Downloads folder.

tar xfz ~/Downloads/eclipse-inst-linux64.tar.gz

~/Downloads/eclipse-installer/eclipse-inst

~/Downloads/eclipse-installer/eclipse-install installer

You will start the installation wizard with the second instruction.

Pick the tools and language that you want to create.

Eclipse Begins

You can now open Eclipse on your Ubuntu device by clicking on the Eclipse icon (Activities -> Eclipse):

A window like this will appear when you start Eclipse for the first time, asking you to pick a Workspace directory:

The default directory ought to be all right. To proceed, press Launch.

Conclusion:

On your Ubuntu 18.04 computer, now you have learned how to install Eclipse. You can start working on your project in Java now.