![]() ![]() Some Linux environment variables such as PATH (to specify search paths for executable files), USER (current user name or user ID), HOME (providing the user’s home directory), SHELL (providing the executed shell to the system), LOGNAME (identifier of the user you are logged in with) are predefined, and some of them are created by users to store custom data. You can run the exportcommand to access a list of your system variables. ![]() The Linux system includes many variables that, in this part of the article, we will talk about the environment variables related to the su command. ![]() Since the variables are part of the shell environment, users can access them throughout the system by any program or process and change the environment variables. Linux environment variables contain information about user settings, system settings, and operating system-related data. Linux environment variables are used to specify default paths, set system parameters, set priorities, and more. Also, Environment variables influence the configuration and customization of the operating system’s behavior and various programs. Definition of environment variablesĮnvironment variables in Linux are dynamic values used to define the characteristics of the environment that executes the shell processes. To better understand the difference between su and su – read this article till the end. Since the difference between su and su – is unclear to the users, we briefly review su vs. The difference between su and su- commands boils down to environment and environment variables. Using the “-” argument forces the su command to run the login shell for the specified user and changes the environment variables and working directory for the current user account. The option “-,” which stands for “login shell,” is one of the common options to change the behavior of the su command. The su command, like other Linux commands, has different options for different purposes. Thesu command is known as the switch command among Linux users because it changes the user ID during a normal login session. The su command is used to switch to another user account in Linux. In previous articles, we introduced you to the sudo command and its difference from the su command so that you can become an expert in managing user permissions and improving Linux security. We try to familiarize you with the functions of various Linux commands so that after purchasing a Linux VPS, you can benefit from the features of Linux and achieve your goals. Linux has a sea of commands for different purposes for optimal use and management of Linux, you must be familiar with different commands. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |