As I'm sure Snowhog would agree, I suggest you have a notepad next to you and write down stuff you do, so you can reverse things if necessary. Good to have a hard record when you're learning the ropes.
Also a good idea: make a copy of the file before editing it so you can revert to the original with a simple "mv" command (mv = "move" and "rename"). For example, before editing /etc/fstab do this in a terminal;
sudo cp /etc/fstab /etc/fstab.orig
Now you have two copies of fstab. If you get stuck like you did, use "mv" to "fix" the situation;
sudo mv /etc/fstab /etc/fstab.bad
sudo cp /etc/fstab.orig /etc/fstab
This example would leave you with three fstab files in /etc/;
fstab
fstab.orig
fstab.bad
The system will only read fstab, but you can look at, compare, and maybe find your mistakes by reviewing fstab.bad and fstab.orig. Once you get done doing whatever it is you're doing and you've verified it works, you can delete the "extra" fstab files if you want (or just keep them);
sudo rm /etc/fstab.bad /etc/fstab.orig
Also a good idea: make a copy of the file before editing it so you can revert to the original with a simple "mv" command (mv = "move" and "rename"). For example, before editing /etc/fstab do this in a terminal;
sudo cp /etc/fstab /etc/fstab.orig
Now you have two copies of fstab. If you get stuck like you did, use "mv" to "fix" the situation;
sudo mv /etc/fstab /etc/fstab.bad
sudo cp /etc/fstab.orig /etc/fstab
This example would leave you with three fstab files in /etc/;
fstab
fstab.orig
fstab.bad
The system will only read fstab, but you can look at, compare, and maybe find your mistakes by reviewing fstab.bad and fstab.orig. Once you get done doing whatever it is you're doing and you've verified it works, you can delete the "extra" fstab files if you want (or just keep them);
sudo rm /etc/fstab.bad /etc/fstab.orig
Comment