NuGrid

Logo

NuGrid website

View My GitHub Profile

The Unix Command Line

This section uses material compiled by Brian O’Shea for his ICP 490 class at MSU.

The shell

The program that provides the command line (not all of the commands) is the shell. A common shell is bash. Try > man bash. The command line is a unix process. Launching a command on the command line interface (CLI) spawns a child process.

File manipulation

File system

Helpful commands

Networking

Processes

Customizing your CLI

You can define variables and aliases in the .bashrc file. The details on how this is set up depends on the particular Linux/Unix/Mac flavour.

Shell scripts

You can combine a sequence of shell commands into a file and use as a shell script. You have to make the file with the script executable (chmod u+x file_name.sh). See file example.sh in the example directory.

Resources

You can find numerous online tutorials and support resources on the internet, such as (search yourself for other and let us know what you find useful) [last updated: 01/2015]:

These tutorials may differ in which shell and/or command line editor they us. Don’t get confused by that.

Exercise: