From the course: Linux Foundation Certified System Administrator (LFCS) Cert Prep

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Manage system-wide environment profiles

Manage system-wide environment profiles

- [Instructor] Now we'll look at how to manage system-wide environmental profiles in Linux. First, what is this so-called environment? We can see our current user's environment with a command like this: printenv or env. What we see here are environment variables. And let's take this example from the output, histsize 1000. This means that currently the variable called histsize is set to 1000. And changing this to another value is as easy as writing histsize=2000 at the command line. So what does this do? In this case, the environment variable is used by Bash, our current login shell. Each time Bash runs it checks this value to know the maximum size of the command history it should save. We can check out the history of every command we ever typed in this session and previous sessions with this command. So with the histsize of 1000, Bash will never save more than 1000 commands in the history. In this case, an environment variable was used as some sort of program setting. Other times…

Contents