How to launch and use a shell terminal in Linux

Find Terminal KDE

People new to Linux tend to react to any reference of the Linux shell terminal with fright. But there is nothing scary about our beloved shell terminal, or what we most commonly call the command-line interface (CLI) or simple the command-line. It is a very powerful place to interact with Linux. Every operating system has its own “command-line,” including Windows.

Unlike a graphical user interface where the operating system is directed to perform varied tasks via point-and-click operations, the Linux shell terminal lets you do the same by typing commands made up of a line of text. That is how we got the “command-line.” The shell just interprets the commands that you type.

The main purpose of this article is to show users new to Linux how to access a shell terminal, and how to open and edit files from its interface. Keep in mind that you do not need to know how to use a shell terminal to use any Linux desktop distribution, but there are occasions when you will need to edit certain configuration files that do not have a graphical management interface.

So I will take you step-by-step on how to become familiar with the command line. Just very basic stuff, nothing fancy. Keep in mind that there are many shells in Linux and other UNIX-like operating systems, but you do not need to know all of them. It is sufficient to know that the default shell in Linux is called Bash, short for Bourne-Again SHell. The name has nothing to do with a religious group or sect, just derived from the name of a very important geek in our history.

You will always find an entry for the shell terminal in the menu of any distribution you are using, and depending on the distribution, it could listed as a Terminal or Konsole. If you are using the latest edition of Ubuntu, follow these steps to launch it:

Related Post:  Replace Oxygen with ROSA theme on any KDE-powered distribution

Press the Super key on the keyboard (that is the key with the Windows logo on it. If you are lucky enough to have a keyboard without that logo, it is the key between the Ctrl and Alt keys). Or just use the mouse to click on the Ubuntu log on the top-left corner of the desktop. In the search box that appears, type “term” or “terminal.” The Terminal should be the first result returned. Click on it to launch it.
Start Shell

Now that you have found and started it, the image below shows what you should have on your desktop. sun@hu:~$ is called the prompt. sun is the username; hu is the hostname, or the name, of the computer; “~” (tilde) represents your home directory; the dollar sign indicates a non-administrative user. Note that if you are not in your home directory, “~” will be changed to reflect the correct present working directory.
 Shell Terminal

Because Ubuntu uses the sudo command to grant administrative privileges, when attempting to edit a file that requires such a privilege, the right way to access the file is to use the gksudo command. gksudo is the GTK+ frontend for sudo. gedit is a graphical text editor. If you from Windows, this is just like Notepad, only much nicer.
Terminal Edit File

If your distribution is powered by the K Desktop Environment (KDE), with the Kickoff Menu, you can find and start the terminal by clicking on the menu’s icon and typing “term” or “terminal” in the search box. One of the results should listed as Terminal or Konsole. Click to start it. If you are using a KDE menu that does not have a search box, the terminal is most likely going to be under the Accessories menu category.
Find Terminal KDE

Related Post:  How to reset passwords on Fedora 21 and 22

The terminal you see on your desktop should be just like the one shown below. The components of the prompt is the same as that of Ubuntu or any distribution using the GNOME desktop environment.
Terminal KDE

If your distribution uses the traditional root account system, where there is a separate root user with a password, besides the regular user(s), and you have to edit a system-wide file, one that requires authentication as an administrator, you will first have to type the su command. When you type su (switch user), the system will prompt you for the password of the root or superuser account. After you authenticate successfully, you may then open the file you wish to edit with a text editor. # (octothorpe) indicates that you are working as the root user.
Terminal KDE SU

This screen shot is used to explain a few basic commands that you may use to navigate the terminal. When you first launch a shell terminal, you will be in your home directory. You can verify that by typing the pwd (present working directory) command. It will always return whatever working directory you are in. If you need to edit a file that is not in your present working directory, and you want to switch or change to the file’s directory, just type the cd (change directory) command followed by the directory you want to change into. As shown in this image (see number 2), I changed into the /etc/default directory. Typing the ls command by itself will list the files in the present working directory. Finally, you can open the file without appending the directory it is in before the name of the file.
Navigate Terminal

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn

Hola! Did you notice that LinuxBSDos.com no longer run network ads?  Yep, no more ads from the usual suspects that track and annoy you across the Internet. But since I still need to pay to keep the site running, feel free to make a small donation by PayPal or your favorite cryptocurrency.

  • Bitcoin
  • Ethereum
  • Xrp
  • Bitcoin cash
  • Bitcoin sv
  • Litecoin
  • Binance coin
  • Cardano
  • Ethereum classic
Scan to Donate Bitcoin to bc1qzvlte2m224zkayhdc7fdfjkp2rsgt0l5a496ua

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x0F4362DFF77F3Ba0Dc637F5f3Eba35D09a2fA60C

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Xrp to r4ggjvL36njsMCYTkJ3S7cTHscPsMsSGQv

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Bitcoin cash to qrs0dedzp9t55af3nfwypydghp29r0xguy9s20fz2k

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Bitcoin sv to 15K9TLyVDBtLuG9cYvXCX9SSkq9C9oUKHK

Donate Bitcoin sv to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin sv

Scan to Donate Litecoin to LetJ9QQMb7u2LMZ9Tu6rtHwcBcQFW98fbG

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Binance coin to bnb1ga8trq08ssqepd90v6225nzfgy448pu5pw8gxp

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Cardano to addr1qx2354yw49etstfljpdhwja3ajjlt487lg95vu9ngy2q6vu4rf2ga2tjhqknlyzmwa9mrm997h20a7stgectxsg5p5esq5l7d9

Donate Cardano to this address

Scan the QR code or copy the address below into your wallet to send some Cardano

Scan to Donate Ethereum classic to 0xcD6CC972a2297FcafACDcfE042C55C69516a9264

Donate Ethereum classic to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum classic

Subscribe for updates. Trust me, no spam!

Sponsored links

1. Attend Algorithm Conference, a top AI and ML event.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.
4. Axo Finans.

Upcoming events

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest

On social media
Via my newsletter

Partner links

1. Attend Algorithm Conference, a top AI and ML event for 2021.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.
4. Axo Finans.
Hacking, pentesting distributions

Linux Distributions for Hacking

Experts use these Linux distributions for hacking, digital forensics, and pentesting.

Categories
Archives

The authors of these books are confirmed to speak during

Algorithm Conference

T-minus AI

Author was the first chairperson of AI for the U.S. Air Force.

The case for killer robots

Author is the Director of the Center for Natural and Artificial Intelligence.

Why greatness cannot be planned

Author works on AI safety as a Senior Research Scientist at Uber AI Labs.