Are Linux Environment Variables Stored on the File System?

AI Thread Summary
In Windows, environment variables and system settings are stored in the registry, making direct file system backups of software installations impractical. In contrast, Linux stores environment variables on the file system, allowing for more straightforward backup processes. While it is possible to back up a software installation by copying its directory, certain files, like those in /dev, require special handling during the copy process. Full disk backups can be achieved using disk cloning software, which must be compatible with the file system of the main drive and the external backup drive. Before cloning, it is advisable to perform virus scans, disk cleanups, defragmentation, and error checks to optimize the backup process. Additionally, deactivating unnecessary processes and prioritizing the cloning program can enhance performance. For redundancy, maintaining multiple operating system installations on separate drives can facilitate easier backups and restores. This approach is applicable to both Windows and Linux 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.
 
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top