Post by sabbirislam258 on Feb 14, 2024 18:06:04 GMT 9
Administration of Linux systems is impossible without knowledge and mastery of methods of managing variables of the software environment. However, the situation is complicated by the large number of variables of different types and the presence of several configuration files with different degrees of priority placed in different places. Knowing the specifics of the specified segment will help simplify and speed up the system management process. Let's consider these points in more detail and demonstrate work with variables on specific examples. Organization of command execution environment in Linux systems User interaction with the Linux system usually takes place through a command interpreter or shell, which interprets the commands entered from the terminal or available in the script and starts them for execution. For the possibility of such "communication", each time the shell creates a separate session with the user, which has its own characteristics.
For example, this can be related to a user profile or system settings. When initializing Bulgaria Telemarketing Data a new session, the shell reads the values of the settings parameters set in the configuration files and opens a session with the appropriate properties. The values of the parameters of the software environment are fixed using variables, which can be conditionally divided into global and local. The first usually include environment variables, the values of which become available to all running programs and child processes of the shell. Local variables relate to the operation of the current shell only and are usually used to store characteristics of the current shell and the user. Their values are not transmitted to subordinate processes. They were called variable shells. By common convention, any variable must be distinguished from other types of shell language constructs by using only uppercase characters in its name.
A specific set of commands specific to each type of variable is used to view or change the values of the specified variables. The main sets of variables of each type and how to work with them will be discussed below. Environment variables and working with them Let's consider the variables that are most often used in the work of the Administrator TERM – sets the type of terminal used; PATH – specifies a list of directories for searching executable files; PWD – stores information about the user's current working directory; HOME – stores data about the home directory of the current user; USER – records the name of the current authorized user of the system; SHELL – stores data about the name and location of the current command interpreter; LANG – language settings and character encoding. To view the values of environment variables, there is a printenv command . They can be displayed all at the same time or separately one at a time. For example, let's look at the list of variable values available in the system.
For example, this can be related to a user profile or system settings. When initializing Bulgaria Telemarketing Data a new session, the shell reads the values of the settings parameters set in the configuration files and opens a session with the appropriate properties. The values of the parameters of the software environment are fixed using variables, which can be conditionally divided into global and local. The first usually include environment variables, the values of which become available to all running programs and child processes of the shell. Local variables relate to the operation of the current shell only and are usually used to store characteristics of the current shell and the user. Their values are not transmitted to subordinate processes. They were called variable shells. By common convention, any variable must be distinguished from other types of shell language constructs by using only uppercase characters in its name.
A specific set of commands specific to each type of variable is used to view or change the values of the specified variables. The main sets of variables of each type and how to work with them will be discussed below. Environment variables and working with them Let's consider the variables that are most often used in the work of the Administrator TERM – sets the type of terminal used; PATH – specifies a list of directories for searching executable files; PWD – stores information about the user's current working directory; HOME – stores data about the home directory of the current user; USER – records the name of the current authorized user of the system; SHELL – stores data about the name and location of the current command interpreter; LANG – language settings and character encoding. To view the values of environment variables, there is a printenv command . They can be displayed all at the same time or separately one at a time. For example, let's look at the list of variable values available in the system.