Terminal

3. Terminal#

Terminal is an application that allows communication with the operating system using command line interface (CLI), which is useful for saving time and automating repetitive tasks. Unlike applications with graphical user interfaces (GUIs) - which contain buttons, sliders, and other interactive elements - using the terminal requires us to enter lines of code (commands) in CLI in order to perform tasks. These commands are then executed by a shell, which is a user interface to the operating system.

Every operating system has a terminal where you can type commands to interact directly with the system. It’s a powerful way to control the computer without using graphical windows or menus. However, shells differ between operating systems:

  • Linux/macOS: They use the Bash shell (Bourne-Again SHell) with commands based on Unix-like systems, such as ls to list files.

  • Windows: It has its own shells (CMD or PowerShell) with different commands, like dir to list files. However, tools like Git Bash, WSL (Windows Subsystem for Linux), or Cygwin let you use Bash shell and Linux commands on Windows.

In this book, we will use Bash independent of whether you have WindowsOS, macOS or Linux, as Bash is widely used in scientific computing and most bioinformatics tools are designed for Linux environments.

Starting with the terminal is essential for a few reasons. First, it provides an efficient way to interact directly with the operating system, allowing us to navigate directories, manipulate files, install and run programs, and more. These skills are foundational for anyone working in nanobiology, as they help streamline workflows and give you control over your environment.

The terminal is also tightly linked to many essential programming tools and concepts, such as package management and version control. For instance, many tools for installing software, managing dependencies, and version-tracking code operate primarily through the CLI. It is also possible to execute Python scripts from a terminal.

Beyond these practical uses, the terminal is also invaluable for remote access and management of other computers. Tools like SSH (Secure Shell) allow you to access and control remote machines, such as supercomputing clusters like DelftBlue at TU Delft. Remote access is common in fields that require high-performance computing, such as bioinformatics and computational biology, where many tools are designed for Linux and command-line use.

../../_images/map2.png