Lesson 1

Date: 5/30/2018
User accounts, files and directories, processes, system commands.
Linux System Administration

Linux shells

  • When you login to a Linux system, you get a command shell.

  • Shells are listed in /etc/shells. Default Linux shell: bash

  • System commands, scripts and applications run in the shell - they become child processes of the shell.

  • Shell variables are local to the shell.

  • A shell variable becomes an environment variable after executing command export on it:
     svar=VAR_1  #initialize shell variable
     export svar #becomes environment variable
     env | grep svar
    Environment variables are inherited by the child shells and processes.

  • Commands executed in the shell should be either built-in shell commands, or addressed with the full path, or located in the PATH env. variable.
      echo $PATH

    Create a new shell variable, svar:
    echo $svar
    Start a new child shell and see if svar is defined there:
    echo $svar
    Exit from the child shell, export the variable, and see if it is defined in a child shell:
    export svar
    echo $svar

  • Take me to the Course Website