How Do You Reset an Environment Variable in Linux?
Contents

How do I reset environment variables?

The best and full proven method to reset environment variables for any windows version is to perform a system restore. Press windows button> type and open System Restore > click Next > select a restore point> click Finish. It may take several minutes.

How do I permanently unset an environment variable in Linux?

Once removing the line from the file, log out, and log back in (if in a terminal, just close the terminal and reopen it). If it was in /etc/environment then consider rebooting the system first. With the export line gone, the variable will be ‘permanently unset’ until the line is readded to one of those files.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest