How to show a list of all databases in MySQL

When we work with a MySQL server, it is an everyday activity to view or list the databases, display the database table. The display of the user account information and privileges residing on the server.

Displaying MySQL Databases:

Open the MySQL Command Line Client that appears with a prompt for mysql>. First, use the password you created during the installation of MySQL to log into the MySQL database server. You are now linked to the host of the MySQL server, where all SQL statements can be executed. Finally, to list/show databases, run the SHOW Databases command.

The most popular way to get a list of MySQL databases is to connect to a MySQL server using the MySQL client and execute the Display DATABASES order.

Open the MySQL server using the following command and, when prompted, enter your MySQL user password:

mysql -u user -p

Utilizing schemas:

MySQL also allows one to list databases with another instruction, which is a Display SCHEMAS statement. This command is a Display DATABASES synonym and gives the same result.

SCHEMAS SHOW;

Displaying all MySQL databases:

You would need to log in as a user who can access all the databases to list all the databases on the MySQL server by default. The MySQL root user, or set a global privilege for Display DATABASES.

Log in to the root MySQL user:

mysql -u user -p

Run the DATABASES Display command:

DATABASES SHOW;

On the MySQL server, you can see a list of all the databases.

Database list using pattern matching:

The Display Databases command in MySQL also offers an alternative that allows us to filter the returned database by matching the LIKE and WHERE clauses with different patterns. The LIKE clause lists the name of the database that fits the pattern specified. More versatility is provided by the WHERE clause to list the SQL statement database that fits the specified condition.

Syntax:

The syntax for using pattern matching with the Display Databases command is as follows:

LIKE pattern Display DATABASES;

DISPLAY DATABASES WHERE the phrase is;

You can understand this with the following example where the percentage sign assumes zero, one, or several characters:

LIKE " percent schema" Display DATABASES;

The LIKE clause is often not sufficient; we can then conduct a more detailed search to query the information schema’s database information from the schema table. In MySQL, the information schema is a database of information to get the results using the command Display DATABASES.

FROM information schema.schema; SELECT schema name

With the Display DATABASES instruction, you can check how the WHERE clause is used. This statement returns the database whose name for the schema begins with ‘s’::

SELECT schema name FROM schema. Schema details WHERE schema name LIKE percentage;

Database list via command line:

You can use either the MySQL command with the -e option that stands for executing or the mysqlshow that shows database and table information. It is used to get a list of databases without logging in to the MySQL shell.

This is particularly useful when you want to work with shell scripts for your MySQL databases.

To present a list of all databases, run the following command on your terminal:

mysql -u user -p -e 'database display;'

The Conclusion:

Here, you have learned how to display or list tables in the MySQL database and use pattern matching to filter performance.

How to Run Cron Jobs Every 5, 10, or 15 Minutes

A cron job is work performed at given intervals. A minute, hour, Day of the month, month, Day of the week, or any combination may be scheduled to perform the tasks.

In general, Cron jobs are used to automate system maintenance or management, such as backing up databases or records, updating the system with the latest security updates, checking the use of disk space, sending emails, etc.

Some of the most widely used cron schedules are running cron tasks. It executes in 5, 10, or 15 minutes intervals.

Syntax and Operators of Crontab

Crontab (Cron table) is a text file that specifies the cron work schedule. You can build, access, change and delete Crontab files with the crontab command.

each and every line holds six fields isolated by a space followed by the command to be executed:

* * * * * command(s)

^ ^ ^ ^ ^

| | | | |     allowed values

| | | | |     -------

| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)

| | | ------- Month (1 - 12)

| | --------- Day of month (1 - 31)

| ----------- Hour (0 - 23)

------------- Minute (0 - 59)

It also accepts the following operators for the five fields at the beginning (time and date):

* – Asterisks as an operator means it allows all the values. If you have the asterisk symbol in the Minute sector, every Minute, the task is performed.

– – The hyphen operator allows several values to be defined. If you set 1-5 in the Day of the Week box, the task will run weekly (From Monday to Friday). The set is inclusive, which means that the range contains the first and last values.

, – The comma operator helps you to identify the repetition list of values. If you have 1,3,5in the Hour area, the task will run at 1 am, 3 am, and 5 am. The list can contain ranges and single values, 1-5,7,8,10-15

/ – You can use the slash operator to define phase values that can be used in combination with ranges. For, e.g., if you have 1-10/2 in the Minute’s sector, this means that the action is executed in the range 1-10 every two minutes, the same as specifying 1,3,5,7,9. Also, you can use the asterisk operator instead of a set of values. “You can use “*/20” to designate a job to be executed every 20 minutes.

The system-wide crontab file syntax varies slightly from that of user crontabs. This requires an additional mandatory user area defining which user is running the cron job.

* * * * * <username> instruction <username> (s)

Use the crontab -e command to modify the crontab file or build one if it doesn’t exist.

Run a job every 5 minutes with Cron

Every five minutes, there are two ways to run a cron job.

The first choice is to create a list of minutes using the comma operator:

0,5,10,15,20,25,30,35,40,45,50,55 * * * *Command

The above line is syntactically right, and it’s only going to work correctly. Typing the entire list might, however, be tedious and prone to mistakes.

The second choice for specifying a job to be done every 5 minutes is to use the phase operator:

*/5 * * * * Order * Command *

*/5 means that you create a list of all minutes and run the job from the list for every fifth value.

Run a job every 10 minutes with Cron

To run a cron job every 10 minutes, in the crontab code, add the following line:

*/10 * * * * command

Run a job with Cron every 15 minutes

To run a cron job every 15 minutes, in the crontab code, add the following line:

*/15 * * * * command

How to Rename Files and Directories in Linux

Renaming documents is one of the most common tasks you regularly want to carry out on a Linux system. You can rename documents by use of a GUI document manager or through the command-line terminal.

Renaming a single document is not hard however renaming more than one document at once may be a challenge, especially for customers who’re new to Linux.

In this tutorial, we will display you the way to use the mv and rename instructions to rename documents and directories.

Renaming Files with the mv Command

The mv command (short of circulate) is used to rename or circulate documents from one region to another.

Syntax used for the mv command is as follows:

mv [OPTIONS] source destination

Copy

The source may be one or more documents, or directories and destination may be a single document or directory.

If you specify more than one document as source, the destination should be a directory. In such cases, the source documents are transferred to the targeted directory.

If you specify a single document as source, and the destination target is a current directory, then the document is moved to the required directory.

To rename a document, you want to specify a single document as a source and a single document as a destination target.

For instance, to rename the document file1.txt as file2.txt you’ll run:

mv file1.txt file2.txt

Renaming more than one documents with the mv Command

The mv command can rename only one command at a time effectively  , however it may be used together with different commands which include find or inside bash for or while loops to rename more than one document.

The following instance indicates the way to use the Bash for loop to rename all .html documents in the present directory by converting the .html extension to .php.

for f in *.html; do

    mv -- "$f" "$f%.html">.php"

done

Copy

Let’s examine the code line by line:

The first line creates a for loop and iterates through a listing of all documents edging with .html.

The 2d line applies to every object of the listing and moves the document to a new one replacing .html with .php.

The element ${document%.html} is by use of the shell parameter expansion to get rid of the .html element from the filename.

done suggests the end of the loop segment.

Here is an example by use of mv in combination with find to gain similar above:

find . -depth -name "*.html" -exec sh -c 'f=""; mv -- "$f" "$.php"' ;

" xss="removed">Copy

The find command is passing all documents ending with .html in the present directory to mv one at a time using the -exec option. The string is the name of the document presently being processed.

As you could see from the examples above, renaming more than one document using the mv command isn’t an easy project because it requires a great amount of Bash scripting.

Renaming Files with the rename Command

The rename command is used to rename more than one document. This command is extra advanced than mv because it requires a few fundamental understanding of regular expressions. There are  variations of the rename command with unique syntax.

Here in this tutorial, we are going to use  the Perl version of the rename command. If you don’t have this version set up on your system, you could effortlessly install it by using the package manager of your distribution.

Install rename on Ubuntu and Debian

sudo apt install rename

Install rename on CentOS and Fedora

sudo yum install prename

Install rename on Arch Linux

yay perl-rename ## or yaourt -S perl-rename

The syntax for the rename command is as follows:

rename [OPTIONS] perlexpr documents

Copy

The rename command will rename the documents in step with the required perlexpr regular expression. You can study more about perl regular expressions here .

The following instance will change all documents with the extension .html to .php:

rename 's/.html/.php/' *.html

You can use the -n choice to print names of documents to be renamed, without renaming them.

rename -n 's/.html/.php/' *.html

The output will look something like this:

rename(file-90.html, file-90.php)

rename(file-91.html, file-91.php)

rename(file-92.html, file-92.php)

rename(file-93.html, file-93.php)

rename(file-94.html, file-94.php)

By default, the rename command doesn’t overwrite present documents. Pass the -f choice to permit present documents to be overwritten:

rename -f 's/.html/.php/' *.html

Below are some more common examples of how to use the rename command:

Replace areas in filenames with underscores

rename 'y/ /_/' *

Convert filenames to lowercase

rename 'y/A-Z/a-z/' *

Convert filenames to uppercase

rename 'y/a-z/A-Z/' *

Conclusion

Here we have shown you the way to use the mv and rename instructions to rename documents.

There also are different instructions to rename documents in Linux, which include mmv. New Linux customers who’re intimidated by the command line can use GUI batch rename equipment which include the Métamorphose .

If you’ve got any questions or feedback, Just feel free to leave a comment.

How to Rename Directories in Linux

Renaming directories is one of the most primary operations you frequently want to perform on a Linux system. You can rename directories from the GUI document manager with more than one click or the use of the command-line terminal.

This article explains a way to rename directories by the use of the command-line.

Renaming Directories

In Linux and Unix-like running systems, you may use the mv (short of move) command to rename or circulate documents and directories from one place to any other.

The syntax of the mv command for shifting directories is as follows:

mv [OPTIONS] source destination

For instance, to rename the listing dir1as dir2 you will run:

mv dir1 dir2

When renaming directories, you need to specify precisely arguments to the mv command. The first argument is the present name of the directory, and the second argument is the new name.

It is essential to notice that if dir2 already exists, dir1 is moved to the dir2 directory.

To rename a listing that isn’t in the present  running directory, you want to specify both absolutely the or relative path:

mv /home/user/dir1 /home/user/dir2

Renaming Multiple Directories

It is easy  to rename a single directory challenge, however renaming more than one directories straight away may be a challenge, specifically for new Linux users.

Renaming more than one directories straight away is not often needed.

Renaming Multiple Directories with mv

The mv command can rename the handiest one report at a time. However, it may be used along with different instructions such as find or interior loops to rename more than one document straight away.

Here is an example displaying a way to use the Bash for loop to append the present date to the names of all directories in the present operating directory:

for d in *; do

  if [ -d "$d" ]; then

    mv -- "$d" "$d">_$(date +%Y%m%d)"

  fi

done

Let’s examine the code line through line:

  • The first line creates a loop and iterates by a listing of all documents.
  • The 2nd line examines if the document is a directory.
  • The 3rd line appends the present date to every directory.

Here is an answer to the same challenge the usage of mv in aggregate with find:

find . -mindepth 1 -prune -type d -exec sh -c 'd=""; mv -- "$d" "$_$(date +%Y%m%d)"' ;

The find command is passing all directories to mv one after the other the use of the -exec alternative. The string  is the name of the listing presently being processed.

As you may see from the examples, renaming more than one directories with mv isn’t an easy challenge because it requires a very good understanding of Bash scripting.

Renaming more than one directories with rename

The rename command is used to rename more than one document and directories. This command is superior to mv because it calls for a fundamental understanding of regular expressions.

There are  variations of the rename command with unique syntax. We use the Perl version of the rename command. The documents are renamed in step with the given perl ordinary expression .

The following instance suggests a way to update areas in the names of all directories in the present  operating listing with underscores:

find . -mindepth 1 -prune -type d | rename 'y/ /_/'

To be on the safe side, pass the -n alternative to rename to print names of the directories to be renamed without renaming them.

Here is any other instance displaying a way to convert listing names to lowercase:

find . -mindepth 1 -prune -type d | rename 'y/A-Z/a-z/'

Conclusion

We’ve proven you a way to use the mv instructions to rename directories.

If you’ve got  any questions or feedback, just  leave a comment.

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 Move Files and Directories in Linux with mv Command

Mv is one of the Linux commands that must be learned. Mv stands for transferring files or directories from one place to another and is primarily used for moving them.

The syntax is similar to the cp command in Linux, but there is a fundamental distinction between these two commands.

The cp command can be called a copy-paste method. The mv instruction, while the cut-paste process can be equivalent.

This means the file or directory is transferred to a different location using the mv command on a file or directory. The source file/directory is no longer there.

mv Command How can you use it?

The mv(transfer) command will move files and directories from place to place. It is also ideal for renaming files and folders.

mv [OPTIONS] source destination
  • The source may be a single file or directory in the above command. The destination is always a single file or directory.
  • When we have several files or folders, it is always a directory destination. Both source files and folders, in this case, are transferred to the directory of the destination. When we have a single source file and a destination directory, the file is transferred to the target folder.
  • One crucial point is that when we transfer files and folders, we will obtain permission refused if we don’t have written permissions both for the source and destination.

mv mv image.png PNG

The current working directory transfers the image.png file to the PNG folder in the current work directory.

The original filename is renamed as the destination file if the destination directory isn’t present.

The image.png file is called PNG if it is not present in the existing working directory.

Transfer several folders and files

Specify the files you want to transfer as the source to move several files and folders. For instance, you would type to transfer file1 and file2 to the directory dir1:

mv File1 File2 dir1

You can also use pattern matching with the mv button. For, e.g., you would like to transfer all pdf files to the ~/Documents directory from the existing directory:

mv *.pdf ~/Documents

Drag a folder inside a separate folder with the mv command
We may use the following command to transfer a directory within another directory:

mv mv abcd abcd_New

It passes the abcd directory to another abcd New directory in our existing working directory.
The source directory is reset to the destination directory if the destination directory is not present.

How to transfer several files to another directory:
All source files and the path to the target directory are defined to transfer several files within a different directory.

mv <source(source)file path 3>

Our current working directory transfers the files 1.jpg, 2.jpg, and 2.png into a separate image directory in the current working directory.

Within a directory, we can transfer multiple files using regular expressions that match the filenames to be transferred.

Mv *jpg JPG

All files with mv backup:
We use the -b option to back up current files. It is intended to create a backup of the overwritten ~ character file with the attached backup file name.

mv -b a.jpg 1.jpg

ls

File rename

The mv command is essential for file renaming. The source file shall be renamed to the target file if you are using an mv command and specify a file name in your destination.
mv source_file target directory/target file

Suppose the target file does not exist in the target directory. In that case, the target file will be generated in the above case.

However, it overwrites without asking if the target file already exists. This means that with the source file’s content, the content of the current target file will be modified.

OverRight file when moving:

The existing file contents would be automatically overridden if a file is transferred and there is already a file with the same name.

In all cases, this might not be optimal. The overwriting scenario is available in a variety of ways.
You may use the -n option to avoid overwriting existing files. So mv will not overwrite the current file.

mv -n source_file target_directory

Forced movement of the file:

If you are shielded from writing the target file, you will be required to check until the target file is overwritten.

mv file1.txt target
Mv: substitute 'target/file1.txt' for 0444 overriding (r—r—r—) mode?

You may use the force option -f to bypass this prompt and overwrite the file immediately.

mv -f File1.txt target

How to Install Python Pip on Ubuntu 20.04

If Python is still new to you, Python is a high-level programming language oriented towards objects that have become increasingly popular over the years. Python is commonly used in software, device management, analyzing scientific and numeric data, and much more.

It is possible to install either Python 2 or Python 3 on Ubuntu 20.04. With Ubuntu 20.04, though, Python 3 is the default version. PIP is a software tool that allows you to install different packages of Python on your device. Packages can be installed from the PyPI Python Package index repository and other index repositories into your framework with the PIP tool’s help.

It is strongly recommended to install the module’s dev package with the apt tool when installing a global Python module. They are checked to function correctly on Ubuntu systems. The prefix for Python 3 packages is python3- and the prefix for Python 2 packages is python2-.

Using Pip to globally install a module only if no deb package exists for that module.

You prefer to use pips only in a virtual world. For a particular project, Python Virtual Environments allows you to install Python modules in an isolated area rather than installed globally. This way, you do not have to worry about other Python projects being affected.

Installing Pip in Python 3

To install the Python 3 pip for Ubuntu 20.04, run the following root, or sudo user commands on your terminal:

sudo apt update sudo apt install python3-pip

All the dependencies needed to construct Python modules will also be installed with the above instruction.

Verify the installation when the installation is completed by reviewing the pip version:

pip3 --version

Install a Python 2 pip

In the repositories of Ubuntu 20.04, Pip for Python 2 is not included. We’ll be using the get-pip.py script to build a pip for Python 2.

Sudo Add-apt-Universe Repository

Update the index for the packages and install Python 2:

sudo apt update sudo apt install python2

To download a get-pip.py script, use curl:

curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py

You can run the installing script as sudo user with python2 to install Pip for Python 2 once the repository is enabled:

sudo python2 get-pip.py

Pips can be installed worldwide. If it is just for your user to install, run the command without sudo. Setuptools and wheels are also installed in the script, enabling you to install source distributions.

Verify installation by the version number of the pip:

pip2 --version

How do you make use of Pip?

Let’s see, a few useful simple commands for pips. With Pip, you can install PyPI, version control, local projects, and delivery file packages. Generally, PyPI packages are installed.

To display the list of all options and pip commands, type:

pip3 --help

Using Pip <command> –help, you can get more information about a particular command. To get more information about the install order, for example, type:

pip3 install –help

Using Pip to install Packages

If you want to install a scrapy kit used to scrape data from websites and extract it.

You must run the following command to install the latest version of the package:

pip3 install scrapy

To install a particular version of the append == package, and the version number after the name of the package:

pip3 install scrapy==1.5

Download the requirements.txt packages:

Requirements.txt is a text file that includes a list of versions of the pip packages needed to run a particular Python project.

To install a list of requirements listed in a file, use the following command:

pip3 install -r requirements.txt

Installed Packages listing

Use the following command to list all the installed pip packages:

pip3 list

Upgrade with Pip a Kit

To update the kit that is already installed to the new version, enter:

pip3 install --upgrade package_name

Uninstalling Pip Packages

To uninstall a running package:

pip3 uninstall package_name

Completion

Here you have learned about installing pip on your Ubuntu operating system and using pips to handle Python packages.

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.