Shell

From Coder Merlin
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Curriculum[edit]

ExercisesIcon.png
 Coder Merlin™  Computer Science Curriculum Data

Unit: Lab basics

Experience Name: Shell (W1002)

Next Experience: Help Me! (W1003)

Knowledge and skills:

  • §10.121 Demonstrate proficiency in managing files and processes using a command line interface

Topic areas: SSH clients; Linux; Bash

Classroom time (average): 60 minutes

Study time (average): 180 minutes

Successful completion requires knowledge: differentiate between a CLI and GUI; understand the purpose of a prompt and cursor; understand files, directories, and their organizational hierarchy; understand processes; understand the client-server model

Successful completion requires skills: ability to successfully navigate the file hierarchy; ability to create new, empty files; ability to create new text files; ability to append text to an existing file; ability to move and rename files and directories; ability to delete files and directories; ability to suspend and resume processes; ability to terminate processes; ability to successfully determine your location in the file hierarchy

Experience[edit]



👀 See Also[edit]

📺 Videos[edit]

Bash Terminal Beginner's Guide
Linus Torvalds

📖 Texts[edit]

Help Me!
Shell

📚 References[edit]


Key Concepts[edit]

Key ConceptsKeyConceptsIcon.png
  • A client-server model is a means of distributing resources between the provider of a service and a consumer of that service, the client. The advantages of this model include:
    • Users don't need to personally possess the hardware and software required to implement the service
    • Users don't need to worry about installation and configuration
    • Users are able to access their data from anywhere in the world
    • The state of a users data remains consistent, regardless of how and from where they access the server
  • A shell is a user interface that provides access to an operating system’s services. Two basic types of shells exist:
    • A command-line interface (CLI)
    • A graphical user interface (GUI)
  • A prompt lets you know that the server is ready and waiting for your input
  • A cursor is a flashing block that indicates where new characters will appear as you type
  • A file is either a destination or source for a stream of data
  • A process is a program that is being executed by the operating system
  • All files are integrated into a single, hierarchical structure called a directory
    • A directory provides a logical grouping of related files (and potentially other directories)
    • The top of this tree is called the root and is referred to by a slash (/)
    • A subdirectory is a directory contained within another directory, called the parent directory
    • On Unix systems, the file structure is logical rather than physical
    • A path describes an ordered transition through one or more directories on the way to a destination (either a directory or a file)
      • Paths that begin at the root (symbolized by the initial slash) are called absolute paths
      • All other paths are relative paths
    • Your home directory is indicated by a special symbol, the tilde (~)
    • Your working directory can be thought of as your current directory
    • The command pwd prints the working directory
    • The command mkdir creates a new directory
    • The command ls lists the contents of a directory
    • The command cd changes your working directory
    • The command pushd changes our working directory temporarily
    • The command popd returns you to your previous directory after executing pushd
    • The command tree displays a directory hierarchy
    • The command rmdir removes (deletes) a directory
  • The echo command echoes the argument to the output
  • The touch command creates a new, empty file, if such a file does not exist. If such a file does exists, the access and modification times will be set to the current time.
  • The greater-than symbol (>) can be used to redirect output to a file
  • Two greater-than symbols (>>) can be used to append output to a file
  • The cat command allows you to quickly view the contents of one or more files
  • The rm command is used to remove (delete) a file
  • The mv command is used to either move or rename a file
  • The clear command clears the screen
  • A program is an executable file that contains a series of instructions that the computer can execute
  • A process is a program that is being executed on the computer
  • The shell manages processes using jobs
  • The jobs command lists the current jobs associated with your shell
    • A job can be terminated by using the key sequence CONTROL-C
    • A job can be suspended by using the key sequence CONTROL-Z
    • A job can be resumed in the foreground with fg
    • A job can be resumed in the background with bg
  • The man command displays the contents of a manual
  • The reset command resets your terminal

Exercises[edit]

ExercisesExercisesIcon.png

Using pencil and paper, answer all questions in this experience.


After completing W1005:

  •  J1002  Create a journal and answer all questions in this experience. Be sure to:
    • edit your journal using emacs within your ~/Journals directory
    • properly name your journal as J1002.txt
    • include all sections of the journal, properly formatted
    • push your changes to GitHub
    • properly tag your journal as J1002.Final
    • push your tag to GitHub

After completing W1008:

  •  M1002-10  Complete  Merlin Mission Manager  Mission M1002-10.
  •  M1002-31  Complete  Merlin Mission Manager  Mission M1002-31.


Experience Metadata

Experience ID W1002
Next experience ID W1003
Unit Lab basics
Knowledge and skills §10.121
Topic areas Bash
Linux
SSH clients
Classroom time 1 hour60 minutes <br />
Study time 3 hours180 minutes <br />
Acquired knowledge differentiate between a CLI and GUI
understand files, directories, and their organizational hierarchy
understand the client-server model
understand processes
understand the purpose of a prompt and cursor
Acquired skill ability to append text to an existing file
ability to create new text files
ability to create new, empty files
ability to delete files and directories
ability to move and rename files and directories
ability to successfully determine your location in the file hierarchy
ability to successfully navigate the file hierarchy
ability to suspend and resume processes
ability to terminate processes
Additional categories