The Bash shell holds environment and shell variables. These variables set important environmental data for the shell. They also allow the environment to be modified and inherited by other processes. Learn how to set and unset variables, how to make shell variables into environmental variables, and how to clear these variables as well.
- [Instructor] There are two types of variables…accessible in a shell session.…Environmental variables are variables…that are defined for the current shell…and are inherited by any child processes…or child shells.…Shell variables are variables that are contained…exclusively within the shell in which they were defined.…They are often used to keep track of data…like the current working directory.…To see the environmental variables in a terminal,…type in printenv and hit Enter.…If you want to get the value of an individual variable,…you can specify it.…
Type in printenv, and for instance type in…capital SHELL and hit Enter.…Another way is to use the echo command…to print the value by typing in echo $SHELL…and hit Enter.…To see the shell variables we use the set command.…Type in set and hit Enter.…By default the set command shows shell functions…as well as variables,…which can be quite long.…To change the behavior of set do posix mode,…which doesn't show functions.…
Use the dash O posix option.…Type in set -o posix…and hit Enter.…
- Topics include:
- Shell tips and tricks
- Pattern matching with globs
- Pattern matching with extended globs
- Using the Bash shell
- Monitoring processes using ps
- Monitoring processes graphically
- Managing processes
- Job scheduling
- Limiting access to AT and cron jobs
- Managing system services
Skill Level Intermediate
Learning Linux Command Line (2016)with Scott Simpson1h 38m Beginner
Linux: User and Group Managementwith Grant McWilliams1h 8m Intermediate
1. Linux Shells Overview
2. Using the Bash Shell
3. Linux Processes
4. Job Scheduling
5. System Services
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.