Are Linux Environment Variables Stored on the File System?

Click For Summary

Discussion Overview

The discussion revolves around the nature of environment variables in Linux, specifically whether they are stored on the file system. Participants also explore the implications of this on software backup and installation processes, comparing it to Windows systems.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant questions whether environment variables in Linux are stored on the file system, contrasting it with Windows, where such variables are not stored in the same manner due to the registry.
  • Another participant notes that certain special files in Linux, such as those in /dev, are not traditional files but can still be managed by Unix copy utilities.
  • A different viewpoint suggests that it is possible to back up an entire hard disk using disk cloning software, provided certain conditions are met, such as disk formatting and available space.
  • One participant describes a method of using multiple hard drives with different operating systems installed to facilitate backups, implying a similar approach could be applied in Linux.

Areas of Agreement / Disagreement

Participants express differing views on the storage of environment variables and the methods of backing up software installations. There is no consensus on whether environment variables are stored on the file system or the best practices for backing up software.

Contextual Notes

Some assumptions about the nature of environment variables and the specifics of disk cloning processes remain unaddressed. The discussion does not clarify the limitations of the proposed backup methods or the conditions under which they may fail.

Who May Find This Useful

This discussion may be of interest to users exploring Linux system administration, software backup strategies, and those comparing Linux and Windows operating systems.

Simfish
Gold Member
Messages
811
Reaction score
2
system?

I know that it isn't possible in Windows since Windows has the registry and background variables that aren't stored on the file system for some reason.

But what about Linux? Are its environment variables stored on the file system? Is there anything that isn't stored on the file system? Is it possible to even backup a software installation by copying the software's directory from one computer to another? If it's not possible, then why not?
 
Computer science news on Phys.org


There are a few special files like those in /dev which aren't really files and symbolic links but the unix copy utilities know about these and can copy (or recreate) them correctly
 
Last edited:


It is actually possible to back up an entire hard disk on an external disk provided that the external disk is formatted to the same file system used by the main drive, the external drive has enough space to accommodate the files, and that a disk cloning program is used. The disk cloning program has a special function that overrides the security fail safe that prevents running processes on the computer from having the running files copied, this way a complete copy of the contents of the drive can be made on a backup disk. A list of disk cloning software can be found here:

http://en.wikipedia.org/wiki/Comparison_of_disk_cloning_software

It is recommended that the freeware or the General Public License software be downloaded because they are free and they have the same functionality as the proprietary software. After installing the disk cloning program, it is recommended that a virus and malware scan be run first to eliminate any security threats on the main drive so that they do not get copied into the external drive. It is also recommended that a disk cleanup be run to eliminate any garbage or ghost files, a defragmentation to cluster files together and eliminate needlessly occupied volume to decrease the overall size of the files, and an error check to fix or eliminate bugs which also occupy space on the hard drive. Afterwards, it is also recommended that all unnecessary processes be deactivated via the task manager and that the process priority for the disk cloning program be set to maximum to accelerate the copying of the files. The disk cloning program takes an average of 1 hour to complete the transfer of files to the external drive.
 


Another option is to have a second hard drive with a second instance of an OS installed for backup and restore purposes. I have 2 hard drives, each with multiple partitions, each with a copy of windows installed, Windows XP 32 on one, Windows XP 64 on the other (I sometimes do some 64 bit programming). Each OS can backup the other OS partition with a simple drag and drop copy, although I use a program I wrote that also copies the short file names (this is probably not needed anymore). Then I use windiff to compare the backup partition as a verify step.

I assume the same process would work for Linux, just install it twice, on a partition on each hard drive.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 24 ·
Replies
24
Views
11K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 16 ·
Replies
16
Views
6K
  • · Replies 18 ·
Replies
18
Views
2K
Replies
10
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K