Ways to modify/etc/profile files in Linux systems

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.