Get to know Terminal Display, Directory Structure, and Users

To start learning how to use command line interface or Terminal on Linux, the first thing you should do is understand how the structure of command line interface or Terminals.

Open the Terminal application on your Linux.

You can open it by searching through the application menu or by pressing a keyboard combination, generally in some cases desktop environment like Gnome, you can open Terminal by using a keyboard combination CTRL + ALT + T.

After successfully opening Terminal on your device, the appearance of the Terminal will be more or less like this:

Terminal Display in Ubuntu
Terminal Display in Ubuntu

Maybe the distribution or version of Linux that you are using will have a slightly different appearance, but it’s actually the same, you will see a Terminal that has interface more or less like in the picture above.

The terminal in the picture above is the Terminal application emulator default in the Ubuntu distribution.

In addition to the default Terminal emulator, you can also install the Terminal application emulator others according to what you want such as Terminus, Tilix, Cool Retro Term and others that have their own advantages and features.

Viewing Username

In the Terminal display above, the word“yaumil” is the name of user currently in use. If you login with user others, then the word “yaumil” will be replaced with user that you use.

For more details, you can also check you are currently login with user which by using the command:

whoami

Then a name will appear which is the name of user which you are currently using as shown below:

Viewing Username - whoami
Viewing Username – whoami

As the name suggests, command whoami it works to check user that you are using for login At the moment.

Hostname

Writing “ubuntu” in Terminal as in the picture above is the name of the computer or hostname of the system you are using.

Hostname set when the system was first installed, and you can give hostname with any name you want. After installation, you can still change hostname if you want to do it.

To find out more about hostname and how to change it, you can read the article How to Change Hostname on Linux.

Directory Structure, Home and Home Representation

In the picture above, you will see a sign ~ or what is also known as the worm sign. This worm sign represents the Home directory, which indicates you are in the Home directory.

Every time you enter Terminal using a normal useryou will be in the Home directory of user the.

Home directory is a directory owned by each user in particular. When you create or add a user new, the Home directory for that user will be created automatically. Every user each has its own different Home directory.

Home Directory of each user it is located in the “/home/” directory, which is then followed by the name user the.

For example, you have a user named “yaumil”, then the Home directory of user it will have the address “/home/yaumil/”, as well as users other.

To be sure, you can check which position you are currently in by using the command:

pwd

Then it will appear output a directory structure where you are currently as in the following image:

Viewing the Current Directory - pwd
Viewing the Current Directory – pwd

This means you are in a directory “/home/yaumil/” which is the Home directory of user which you are currently using, in this example is “yaumil”.

As mentioned above, the Home directory is represented by a worm sign, to shorten writing, instead of writing the full address like “/home/yaumil/”, you can abbreviate it by using this worm flag.

To find out more about the Home directory, you can read the article What is a Home and Why You Should Create One.

Normal and Root Users

Right next to the worm sign as in the image above, you will see a dollar sign “$”. This dollar sign serves to represent that you are login by using user normal, isn’t it root or administrator.

There are two types of user levels on Linux, namely normal user and root. User administrator will allow you to make system and file system changes, while user normal can only make changes to files in the Home directory it has.

If you log in with root or administrator usersign “$” it will turn into a hash sign “#”. That’s it, the first part of the Learn Terminal tutorial, in the next part we will learn How to View the Contents of a Directory Using Terminal.

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *