From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Modify the shell environment - Linux Tutorial
From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Modify the shell environment
- [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 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 behaviors set to POSIX…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Simple and compound commands5m 59s
-
(Locked)
Modify the shell environment6m 42s
-
(Locked)
Command history3m 30s
-
(Locked)
The PATH and command execution3m 29s
-
Named and unnamed pipes3m 58s
-
(Locked)
Use input-output redirection (>, >>, |, 2>, etc.)5m 2s
-
(Locked)
Use text filters7m 3s
-
(Locked)
Find files using locate4m 51s
-
(Locked)
Finding files with find4m 47s
-
(Locked)
Finding text in files with grep5m 55s
-
-
-
-
-
-
-