সাধারণ বিজ্ঞান

Linux Shell

Share
Share

{mosimage}

The Linux shell is a very important aspect of Linux. Nowadays, regular users typically do not use the shell. Shell programmers are the ones who use it the most. Still, it’s good to know about it. Sometimes, it will be useful. So, let’s take a look at what a shell is?

 

A computer fundamentally understands 0 and 1 —these two numbers, which are known asbinary numbers. That’s why everything in a computer is represented through different combinations of these two numbers. However, expressing anything this way is quite difficult for us. Reading and writing in binary is, frankly, impossible for us. To solve this problem, an intermediary solution was developed, and that is theshell. The shell is a program that takes our commands in English and converts them to binary to give to the computer. In other words, what the shell does for us is:-:-

Your command >> Linux shell >> Conversion to binary >> Now the Linux operating system can understand

This environment was provided for users to perform various tasks. The shell is essentially a commandinterpreterthat takes input from standard input devices like a keyboard or from files and tells Linux what the user wants. When we enter a command from the keyboard, it’s called thecommand line interface(CLI). There are various shells in Linux. Among them, noteworthy ones are bash shell, korn shell, c shell. Bash shellis available in all Linux distributions. It is afreeware.C shellhas asyntaxquite similar to theC programming language. We also use a shell in the Windows operating system. In that case, it’s called the Command Prompt or Command Window. The Command Prompt works just like a shell, but it’s not as powerful as the Linux shell.

Opening the shell in Linux is very simple. You can open the shell in two different ways if you like.

First: Via terminal emulator

Second: Via virtual terminal

Terminal Emulator

A terminal emulator is a program that opens a shell in a window. So, if you want to use the shell from theGraphical User Interface (GUI), the terminal emulator opens a window just like in the Windows operating system, and in that window, it launches your desired program(in this case, the shell).As a result, you don’t have to leave the GUI to use it. Linux has lots of terminal emulators. My favorite among them isxterm.Others includekonsole, rxvt, kvt, eterm, gnome-terminal, etc. You can use any of these and open as many as you want because different terminal emulators have different bells and whistles, but they all do the same job—because each of them uses thebash shell.

Via Virtual Terminal

Another way to use the shell is by exiting the GUI entirely. But you probably won’t want to do that. In that case, you can switch from the GUI and use the shell via a virtual terminal. Just press Ctrl+Alt+F1 and your GUI will temporarily suspend and switch to the virtual terminal. In this way, using the function keys from F1 to F6, you can switch between a total of six virtual terminals. Ctrl+Alt+F1 will take you to the first virtual terminal,just as Ctrl+Alt+F2 takes you to the second virtual terminal,and so on for a total of six.

After you’re done working in the shell, you probably want to return to the GUI. Just press Ctrl+Alt+F7. Great, you have your favorite GUIback.

Sometimes, when you try to access the virtual terminal, you may see alogin: prompt. In that case, enter your username, and if it asks for a password, enter your password. If you ever see a lot of jumbled characters in the virtual terminal, don’t be alarmed. Just move to another terminal—everything will be fine. These things happen occasionally.

Command

Now we will try out some commands to see how the shell works. Open a terminal emulator or virtual terminal. You will see your computer’s name and your username. My computer’s name islocalhostand my username isfaisal.When I open the terminal, I see

faisal@localhost: ~$

You will see your own computer’s name and username. Now type:

faisal@localhost: ~$ kshdfkh

Press Enter. Now, on the monitor, you will see

faisal@localhost: ~$ kshdfkh

bash: kshdfkh: command not found

Great,your shell is working. Now, type again

faisal@localhost: ~$ ls –l

You’ll see the directory list of the drive you’re in. That’s it, you’ve learned how to work in the shell. You’re not far from becoming a shell programmer. Next time, we’ll learn about navigation. But before that, if you take a look at the directory structure, it will help you learn the navigation commands more easily. In fact, learning the directory structure will make learning commands more fun, and you’ll enjoy exploring inside Linux. So that’s all for today.

To be continued……

Share

1 Comment

  • আশা করি আপনি “চলবে……” টি চালিয়ে যাবেন।

Leave a Reply

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

ফ্রি ইমেইল নিউজলেটারে সাবক্রাইব করে নিন। আমাদের নতুন লেখাগুলি পৌছে যাবে আপনার ইমেইল বক্সে।

বিভাগসমুহ

বিজ্ঞানী অর্গ দেশ বিদেশের বিজ্ঞানীদের সাক্ষাৎকারের মাধ্যমে তাদের জীবন ও গবেষণার গল্পগুলি নবীন প্রজন্মের কাছে পৌছে দিচ্ছে।

Contact:

biggani.org@জিমেইল.com

সম্পাদক: মোঃ মঞ্জুরুল ইসলাম

Biggani.org connects young audiences with researchers' stories and insights, cultivating a deep interest in scientific exploration.

নিয়মিত আপডেট পেতে আমাদের ইমেইল নিউজলেটার, টেলিগ্রাম, টুইটার X, WhatsApp এবং ফেসবুক -এ সাবস্ক্রাইব করে নিন।

Copyright 2024 biggani.org