In this topic, we look at the different ways you can use and interact with Linux. Predominantly, this is via the ‘general user interface’ (GUI) or the ‘command line’ (CLI)
This topic includes a text lesson followed by a hands-on Immersive Lab which will introduce you to the Linux command line.
There’s two primary ways of using or interacting with a system that runs Linux. These are through a desktop environment (the general user interface) and through a text-based shell (the command line).
When we use an operating system like Windows or Mac iOS we’ll often use a graphical desktop environment in order to run software, interact with files and do what we need to get done. On Linux, we have a variety of desktop environments to choose from, ranging from very simple and straightforward environments, through to environments with a rich sets of features.
These desktop environments feature the kinds of windows and icons many of us are used to, along with menus and other visual enhancements. We can install and switch between desktop environments to discover which one we like best. Most Linux distributions make a choice for us as to which desktop environment they use out of the box, but one of the primary appeals of Linux for many people is that pretty much anything can be customized. Some popular desktop environments are the GNOME Shell, KDE Plasma Desktop, LXQt, Cinnamon, MATE and XfcE. There are others out there but these are the ones you’ll find to be the most widespread.
While many people use Linux with a desktop environment in order to do their work, some tasks need to be accomplished in a different way. And that brings us to the other primary method of interacting with the Linux system, the console, also known as the command line. The console is a text-based interface where an interactive shell runs. Here we type commands for the shell to run and the shell displays any returned information to us also in text form. The terminology around this can be a little confusing, but it’s important.
The shell is the software we interact with using text commands and text outputs. There are a number of different shells out there with Bash being the most common. Other shells like Zshell, Cshell, fish, Kornshell and more can be found in different distros and they can all be installed on your system if you’d like to explore them. Over time people often develop a preference for one over another, though, being familiar with Bash will help you out on most Linux systems. A shell will often run inside of a terminal application in a graphical environment and if the system is not running a graphical user interface and only has the text interface available, that’s considered a console. It’s also important to know that there are terminal emulators which run on windows and Mac iOS that you can use to connect to a remote Linux machine if it’s running software like SSH or secure shell, both of which provide remote access. SSH or secure shell let us run that remote shell within a local terminal window, so if you plan to explore Linux using the text-based interface, you don’t necessarily need to install Linux on your primary machine just to connect to an installation of Linux on a hobby system or home server. A Mac or a Windows system can connect just fine to a Linux system.
Familiarity with a command line environment will be helpful if you plan to work with Linux systems remotely, connecting to a machine that you’re not sitting in front of in order to control what it does and how it works, and it’s useful, even if you’re working locally. What you intend to do with Linux will influence whether you spend more time in a desktop environment or more time in a terminal environment. Many people mix and match these two ways of working, relying on the strengths of each interface type for different tasks. If it’s browsing the web, editing photos, watching videos, composing music or documents and things like that, you’ll need a desktop environment. You might not even need to think about terminal or command line if you plan to use a Linux system this way. If you plan on connecting to a hobby board like a raspberry PI, a home server or a web server at a cloud host, that’ll be something you can do in a terminal from whatever system you’re already using. You might attach a display directly to a system and run Linux in console mode rather than using a desktop environment. It can be intimidating if you’re just getting started to face an unfamiliar system with an unfamiliar interface, but everyone started somewhere when we began learning how to use a computer and switching operating systems is no different.
This is your welcome to the Linux command line interface (CLI). This lab is designed to introduce you to the wonderful world of CLI.