Introduction

A shell is a program that let’s the user interact with the operating system through a command line. While most computers have graphical user interfaces (GUI), shells only have a textual interface. The textual interface may seem cryptic at first but it can be very useful due to its high action-to-keystroke ratio, its support for automating reportetitive tasks, and it can also access networked machines. There are various shell programs out there with the most common one being Bash (Bourne Again SHell). To begin, let’s figure out which shell we are using by typing echo $SHELL in the command line:

$ echo $SHELL
/bin/bash

echo is a command that prints a string to the terminal. In this case the shell printed the environment variable $SHELL. We can also tell the shell to print anything we like such as

$ echo Hello World!
Hello World!

To print to the screen who the current user is type whoami and your LoginID should be printed to the terminal. If you are using your personal computer then the username will be printed to the terminal.

$ whoami
<LoginID>

Similarly, if we wanted to know who else was logged into the computer type who and a list of the users should print to the terminal. While this workshop will not cover every command the man will become your best friend. The man command prints to the screen the manual page for all other commands recognized by the shell. For example:

$ man mv

NAME 
    mv - move (rename) files
SYNOPSIS
    mv [OPTION] ... [-T] SOURCE DEST
    .
    .
    .

This command will help you later on when you want to figure out how to use a specific command.


Contents ⬅ Previous Introduction Next ➡