Skip to main content

Command Palette

Search for a command to run...

Introduction to the Shell: Shell Basics

Updated
4 min read
Introduction to the Shell: Shell Basics
I

About Me Welcome to my developer's corner on Hashnode! I'm an Electrical and Electronics Engineering graduate with a passion for technology, creative design, and software development. My journey into the tech world began with a deep curiosity for how things work, which eventually led me to explore various facets of engineering and software. Work Experience I have a solid foundation in electrical and electronics engineering, and over the past 1-2 years, I've honed my skills in Photoshop, focusing on photo editing, minimalistic logo creation, and other creative services. My work under the brand TechGecko (TGPhotoshop) has allowed me to combine technical expertise with creativity, providing unique solutions to my clients. On the development side, I am currently building a web application called DayMinder, designed to help users manage their schedules, complete tasks, and receive timely reminders. This project reflects my interest in creating practical tools that make everyday life easier. Accomplishments Freelance Photoshop Editor: Successfully launched a freelance business on Freelancer.com and Upwork, where I offer a range of photo editing and design services. University Graduate: Completed a degree in Electrical and Electronics Engineering, gaining a strong technical background. Ongoing Web App Development: Actively working on DayMinder, a personal productivity tool, which showcases my skills in both design and software development. Interests and Dreams Creative Design: I enjoy exploring the intersection of art and technology, particularly in photo editing and design. My deep curiosity might again lead me to explore other facets of art. Who knows? Software Development: My current focus is on improving my coding skills, particularly in web and application development, and expanding my knowledge in areas like SEO and user experience design. Dreams: My goal is to continue growing as a developer and designer, eventually creating tools and products that have a meaningful impact. I also aim to establish a strong presence in the tech community, sharing my experiences and learning from others. Connect with Me Feel free to reach out on X (formerly known as Twitter) or LinkedIn via my blog home or profile page if you're interested in collaborating on projects or just want to chat about tech, design, or anything in-between. Let's create something amazing together!

UI

Communication between humans and computers is a two-way thing, from the user to the computer, and then from the computer back to the user. The Operating system (OS) of a computer provides a user interface to enable the user to communicate with the computer through its hardware. The interface enables the user to send data and instructions to the computer and the computer to send back information to the user.

The UI (user interface), in the context of computers, is majorly divided into three types:

  • Graphical User Interfaces (GUI), used mainly by Windows systems.

  • Command Line Interfaces (CLI), used mainly by Unix systems, and

  • Natural Language Interfaces, used mainly by virtual assistants like Alexa and Siri.

Graphical User Interfaces

These are interfaces that are graphical in nature. They are the normal interfaces most users are used to as they usually contain visually immersive windows, icons, menus and pointers. They are very intuitive to learn and use.

Command Line Interfaces

These types of interfaces are not easy to learn and use. In CLIs, users are only allowed to type in commands from a predefined list of commands. For inexperienced users, these types of interfaces can be frustrating to use whereas for experienced users, it can be very powerful. This is because the CLI allows users to manipulate the hardware and software of computers in ways that a GUI never could. Some tasks cannot be done as a software programmer without using CLIs. Examples of CLIs are UNIX and DOS.

Why should you care about what a shell is?

The shell presents the CLI, that alone is its importance. If, on the other hand, you still do not know why the knowledge of a CLI should be important to you, or how it applies to you, then I'll give you some reasons.

  • It makes your work less boring, as you can automate repetitive tasks.

  • It makes your work less error prone.

  • It makes your work more reproducible, as it keeps a history of your work and commands.

How to access the shell

If you're using a Mac or Linux machine, you can access the shell via an app known as "Terminal", which is already available on your computer. The terminal is the app into which we will type our commands.

If you're using Windows, however, separate app(s) will need to be downloaded to be able to access the shell. Examples of such apps are Git Bash, WSL, etcetera.

Shell anatomy

The innermost core of the Linux OS is the Kernel. The outermost part of the Linux OS is called the Shell. The Kernel acts as a window between the software and hardware components of the computer, making two-way communication possible. The shell, on the other hand, is the outermost part with the main function of protecting the OS, hence the name Shell.

Main types of Shells

There are more shell types than the ones outlined below, hence the word "main". The main types are:

  • The Bourne shell (sh) - The first ever type of shell, programmed by Stephen Bourne in AT&T. It is also known as the Primary Unix Shell. Examples are ksh, sh and Bash.

  • The C shell(csh) - The Unix enhancement shell, written by Bill Joy.

Shell Prompt

The shell Prompt, "$", on which commands are written and programs are executed is called the command prompt. It is displayed by the shell.

The shell Prompt takes the first written word as a command and executes the command when you press Enter, provided the word is contained in Linux's predefined list of commands.

If this post was helpful to you, then you should consider following us or subscribing to our newsletter for more content of the same nature. Also, liking and sharing the topic may be of help to others.

If you have any question you need answers to, comment them below!

Next Topic:

Conclusion

I hope you found this content as enjoyable to read as I did to write. If you are interested in more content like this, please navigate to my profile and follow me for more content of the same nature.

Connect with Me

Feel free to reach out via X or LinkedIn if you’re interested in collaborating on projects or just want to chat about tech, design, or anything in-between. Let’s create something amazing together!

I

Ask your questions!

More from this blog

T

TechGecko's Blog for Devs

5 posts

This blog invites you to join me on my tech journey from n00b to mastermind.

I post topics in their default ascending hierarchy, making it possible for anyone to learn what I do.