Have you ever experienced a problem with your operating system -- one that was self-inflicted? You might have misconfigured something, only to find that whatever you did caused a cascade failure of other services or apps.
When that happens, you might not even remember what you did to cause the problem. Maybe it was a config file in /etc, which is often the case.
Also: 10 Linux apps I always install first - and you should too
What if I told you there's an app to restore your Linux distribution to a working state, and it's easy to use?
That app is called Timeshift. It creates restore points you can use to return your computer to a working state.
Before I continue, it's important to note that Timeshift is not a backup tool. Rather, it's an application to help you recover from self-inflicted situations where you need to get your system back up and running.
Let's install Timeshift and see how it's used.
What you'll need: The only things you'll need for this are a running instance of Linux and a user with sudo privileges.
Log into your Linux desktop and open a terminal window.
Show moreFortunately, Timeshift is found in most standard repositories. In the case of Arch Linux, it is found in AUR (Arch User Repository). The installation command for Timeshift looks like this:
Now that Timeshift is installed, let's see how it's used.
Show moreWhether or not your machine uses the btrfs file system determines how Timeshift is used. My Pop!_OS system does not use btrfs, so I'll demonstrate the rsync way.
Open Timeshift from your desktop menu, and you will be prompted to type your sudo password. Once the Timeshift window opens, select Rsync or Btrfs. Choose Rsync and click Next.
Unless your system uses the btrfs file system, select Rsync.
Jack WallenTimeshift will then estimate the system size and then present you with a window to select the location that will house the snapshot. I would recommend saving the snapshot to an external drive and not the same drive housing your operating system.
Make sure your destination has plenty of space avaialble.
Jack WallenOn the next screen, you will select how often your snapshots are taken (boot, hourly, daily, weekly, monthly) and how many of those snapshots you want to retain. Click Next to continue.
You'll want to select how often Timeshift takes snapshots and how many to retain.
Jack WallenBy default, user directories are excluded in snapshots. If you have a lot of app and bash configurations, you could include your home directory and then only include Hidden files; otherwise, leave the defaults and click Finish (as that's the last step).
You don't have to include any files from your user directory.
Jack WallenOnce you click Finish, the main Timeshift window will open where you'll see that no snapshots have been taken. You can either wait for the first snapshot to run or create one manually by clicking Create.
A fresh Timeshift window ready for it's first snapshot.
Jack WallenAfter creating a snapshot, should something go wrong, you can open Timeshift, select the snapshot you want to restore, and click Restore. This will return your system to a known, working state and you should be good to go.
Also: 5 Linux terminal apps that are better than your default - and free to install
If you worry that you might misconfigure something on your Linux system, I would highly recommend you consider installing and using Timeshift, so you can easily restore it to a working state.