Using the Kali Terminal on Linux Mint

Why the heck would I want to do this?

I have been using linux mint for years now. I've tinkered with a few other distros but mint was the one I settled on. Over the years, I have learned the basics of the terminal. I'm no expert on it and about 90% of the commands I run are the same ones, like cd or cat.

I have been using Kali linux as well a little. I was doing a course on tryhackme.com and learning the basics of web security. They have this neat thing where you can connect to a virtual machine in the browser to do the lesson, and their vm is Kali. Anyway, long story short, I really liked the Kali terminal, and wanted to see if I could get it running on linux mint. The Kali terminal just gives you feedback when you are using it that the default linux terminal doesn't have.

What the heck is a terminal anyway?

It took me a while to figure out what the terminal on Kali was though. Turns out it uses a terminal called 'qterminal', so I figured i'd check if I could install it with apt search qterminal. It appeared in the search results so I did a sudo apt install qterminal and it worked. Well kinda... The out of the box experience wasn't great. When I opened the terminal, it did not look anything like the Kali terminal, but progress had been made and I prepped google for some searching...

So next, I found out that the Kali terminal uses zsh, rather than bash. Again, from my crappy knowledge of wtf the differences are between the two, basically they are wrappers for the shell. You type something into the terminal and the terminal passes it along to the shell. It's easy to confuse terminals and shells, as essentially they kinda do the same thing. Again, long story short, I had to install zsh and make that the default terminal. So again I searched apt with apt search zsh, and installed it with sudo apt install zsh. Once installed, I ran chsh -s /bin/zsh to make it the default.

Config files be damned

Ok great, but qterminal still looks a bit crap. Unfortunately I can't find the default .zshrc file, but essentially, I copied the ~/.zshrc file from Kali machine over to Linux mint and voila, suddenly the terminal goes from looking dated, to looking slick.

Unfortunately autocomplete wasn't working though, so this was the next speedbump. I headed over to github and did the manual install. I had to tweak the ~/.zshrc file to replace the link to where the 'zsh-autosuggestions.zsh' file was pointing to. Once it was pointing to the right file, autocomplete sprang into life.

Changing the font in qterminal was a pain in the ass. You should be able to do it from settings, but it wouldn't let me pick the font I wanted. Kali uses the firacode font, which is a really neat font which I use in my code editor. To install the font in linux, you can search for it via apt search fira and install it via sudo apt install fonts-firacode. To get qterminal to use it was not as easy. I had to edit the '~/.config/qterminal.org/qterminal.ini' file and change the font family like this 'fontFamily=FiraCode'. (Fun fact, you need to close qterminal before editing this file, otherwise it will try to troll you by undoing all of your changes)

Finally, you can add your own theme to qterminal, but again its a pain in the ass. The themes are located in '/usr/share/qtermwidget5/color-schemes/'. I copied the Kali Dark theme from my Kali laptop over to this folder, restarted qterminal and then picked that from the 'File>Preferences' menu.

Why bother writing this?

There were a lot of places that I needed to find in order to get this working. The 'color-schemes' folder holds all of the themes, the .zshrc holds all of the zsh settings, the 'qterminal.ini' file holds all of the qterminal settings. It took a while to find and edit all of these things, and there was very little info out there on where to look. So even though I got there in the end, it was a lot more effort than I would have liked, and there's a lot going on in the '.zshrc' file that I am clueless about, but I guess something will break sooner or later, and I'll have to fix it, and thats where you learn and figure things out.

At the end of the day, I'm able to run cowsay in qterminal and thats pretty cool I think...

hasta-la-vista.png