In the Linux system, etc/profile files are generally not changed, want to change the Etc/profile file with some special techniques for Linux file modification . This article describes how to modify the/etc/profile file in a Linux system:
The Etc/profile file is read-only and cannot be saved directly with VI or gedit open modification. To modify profile, you need to get root permission (edit with Gedit)
$sudo Gedit/etc/profile
Or
$sudo-S
$gedit/etc/profile
This opens the profile file and you can save it after you modify it.
The method to make the modified profile effective immediately:
Method 1:
$. /etc/profile
。 There is a space between the/etc/profile and the
Method 2:
$source/etc/profile
The source command, also known as a Point command, is a dot symbol (. )。 The source command is typically used to re-execute the initialization file you just modified to take effect immediately without having to log off and log back on.
The above is the Linux system to modify the/etc/profile file method, as long as the administrator rights, even if the Etc/profile file is a system file, can also be modified OH.
This article is from the "Sandshell" blog, make sure to keep this source http://sandshell.blog.51cto.com/9055959/1955796
Ways to modify/etc/profile files in Linux systems