Database Reference
In-Depth Information
Command-line tools
First and foremost, there are the command-line tools that you work with. We use
them by typing their corresponding commands. There are different types of
command-line tools, which we will discuss in the next section. Examples of tools
are ls (Stallman & MacKenzie, 2012), cat (Granlund & Stallman, 2012), and jq
(Dolan, 2014).
Terminal
The terminal, which is the second layer, is the application where we type our
commands in. If you see the following text:
$ seq 3
1
2
3
then you would type seq 3 into your terminal and press <Enter> . (The
command-line tool seq (Drepper, 2012) generates a sequence of numbers.) You
do not type the dollar sign. It's just there to serve as a prompt and let you know
that you can type this command. The text below seq 3 is the output of the com‐
mand. In Chapter 1 , we showed you two screenshots of how the default terminal
looks in Mac OS X and Ubuntu with various commands and their output.
Shell
The third layer is the shell. Once we have typed in our command and pressed
<Enter> , the terminal sends that command to the shell. The shell is a program
that interprets the command. The Data Science Toolbox uses Bash as the shell,
but there are many others available. Once you have become a bit more proficient
at the command line, you may want to look into a shell called the Z shell. It offers
many additional features that can increase your productivity at the command
line.
Operating system
The fourth layer is the operating system, which is GNU/Linux in our case. Linux
is the name of the kernel, which is the heart of the operating system. The kernel
is in direct contact with the CPU, disks, and other hardware. The kernel also exe‐
cutes our command-line tools. GNU, which is a recursive acronym for GNU's
Not Unix, refers to a set of basic tools. The Data Science Toolbox is based on a
particular Linux distribution called Ubuntu.
Executing a Command-Line Tool
Now that you have an understanding of the environment, it's high time that you try
out some commands. Type the following in your terminal (without the dollar sign)
and press <Enter> :
Search WWH ::




Custom Search