How To: Change Your Default Terminal

It’s actually pretty easy to change your default terminal emulator. This post will tell you how to change your terminal to the terminal emulator your prefer.

Your Linux distro came with a default terminal emulator. It may have even come with a couple of terminals installed. That doesn’t mean it’s the best choice for you, it just means that the developers chose to include it.

For example, you might like XFCE-terminal, or you may prefer Terminator. The choices are endless, and Wikipedia has a ton of them listed.

Generally, you can press CTRL ALT T and open your default terminal. If you’d like to change the behavior, first you need to install a new terminal. For example, if you use APT and you want to install Terminator:

[code]sudo apt install terminator[/code]

Now, let’s make it the default. Either open a terminal or use the existing open terminal and enter the following:

[code]sudo update-alternatives –config x-terminal-emulator[/code]

It should look a little like this:

change default terminal emulator

Just pick the number of the terminal emulator you’d like to be the new default and press enter.

To test this, finish up the tasks above and then press CTRL ALT T (or the keyboard shortcuts your distro has set up) and it should now open to your new default.




When Did I Last Reboot My Linux Box?

For any number of reasons, including bragging rights, you may want to know when you last rebooted your Linux computers. It’s actually pretty easy and I’ll show you how.

Crack open your terminal emulator, CTRL + ALT + T will often do it, and enter the following:

[code]last reboot[/code]

What will tell you when you last rebooted, who booted (system), the kernel used, date and time, and how long the system was up for.

For example:

[code]reboot system boot 5.4.0-52-generic Fri Nov 6 19:22 – 18:25 (9+23:02)
reboot system boot 5.4.0-52-generic Mon Nov 2 12:24 – 19:22 (4+06:57)
reboot system boot 5.4.0-51-generic Wed Oct 21 17:23 – 19:22 (16+02:58)[/code]

If you want to see the three most recent boots, you could just use the ‘head’ command.

[code]$ last reboot | head -3
reboot system boot 5.4.0-58-generic Thu Dec 31 14:56 still running
reboot system boot 5.4.0-58-generic Thu Dec 31 09:32 – 14:55 (05:22)
reboot system boot 5.4.0-58-generic Sat Dec 26 01:33 – 09:32 (5+07:59)[/code]

You can even use grep to see how many times you rebooted in a month, for example:

[code]$ last reboot | grep Nov
reboot system boot 5.4.0-54-generic Mon Nov 30 14:28 – 14:20 (3+23:51)
reboot system boot 5.4.0-54-generic Sat Nov 28 15:24 – 14:13 (1+22:48)
reboot system boot 5.4.0-54-generic Fri Nov 27 15:41 – 15:10 (23:29)
reboot system boot 5.4.0-54-generic Wed Nov 25 16:44 – 15:14 (1+22:29)
reboot system boot 5.4.0-53-generic Wed Nov 18 17:03 – 16:19 (6+23:15)
reboot system boot 5.4.0-53-generic Tue Nov 17 18:26 – 16:55 (22:29)
reboot system boot 5.4.0-53-generic Mon Nov 16 19:09 – 17:11 (22:01)
reboot system boot 5.4.0-53-generic Mon Nov 16 18:25 – 18:25 (00:00)
reboot system boot 5.4.0-52-generic Fri Nov 6 19:22 – 18:25 (9+23:02)
reboot system boot 5.4.0-52-generic Mon Nov 2 12:24 – 19:22 (4+06:57)[/code]

And there you have it. It’s much easier than you might think.