Table of Contents
USE1.1 Command Line Interface
HPC systems are usually accessed via a Linux-based Command Line Interface (CLI) that is provided by a shell.
At its core, a shell is simply a convenient tool that you can use to execute commands on a Linux computer. The shell provides a textual interface allowing to interact with the operating system and performing all possible operations, i.e., accessing and manipulating files, and running programs. However, there are various misconceptions that new users typically face when handling a shell such as the Bash. Particularly, dealing with control characters and the format expected when executing programs with arguments can be error-prone.
Part of this skill is the general principles of the interaction with a shell, to execute and to stop programs.
Requirements
Learning Outcomes
- Use the bash shell to execute individual programs with arguments.
- List the set of basic programs and their tasks:
- pwd
- ls
- cd
- whoami
- sleep
- kill
- echo
- clear
- man
- vi, vim, emacs, nano
- exit
- …
- Demonstrate interrupting or aborting of a program execution using CTRL-C.
- Use the available help of a program (–help argument and the man pages).
- Use the shell history to search and execute previously executed commands.
- Demonstrate setting and printing shell variables.
- Show all currently set variables and set as well as unset one manually.
- Identify potential special characters that must be handled with care.
- List strings that could refer to files/directories
- Utilize escaping to ensure correct handling of arguments.
- Understand wildcard characters to select a group of files/directories: “*”, “?”, “[-,]”
