Using the Terminal Emulator in Linux Distros

As people switch from Windows to Linux, one of the common comments is about the use of the Terminal Emulator in Linux.
I remember quite well that during my transition to Linux, I often asked if there was a "GUI" method available. The CLI was so unfamiliar, daunting and so... blank. A 'simple' text based interface seemed to lack buttons, drop down menus and options. With the terminal, I had no idea where to begin, what command to enter and it did not seem to guide me any, as a GUI with buttons and menus does.

Zorin OS is based on helping users to make the switch. In this, it seems very important to teach users how to learn the system rather than to try to Emulate Windows.
This is fundamental, as most users are attempting to find an alternative to Windows for a reason and wish to escape the 'Windowisms" that seizes control over their system.

The terminal is your portal to taking back control.

Appearance

One thing a user can do is add spellcheck and word suggestions to the terminal to help alleviate any fear of typos and add some warmth. You can also add some custom appearance to the terminal, giving it a friendlier look:
https://zoringroup.com/forum/12/15956/
I prefer to use the xfce4-terminal over gnome-terminal for this reason: It allows the Menubar and Toolbar to be active on the Terminal Window, adding quick access to your tools and options along with adding familiarity.

Speed

Work productivity is important. The terminal offers speed like no other, allowing the user to execute an action and move on to the next. With a GUI application, you are searching for the button, exploring the options and reading drop down menus. GUI apps are often very limited in what they can do whereas the terminal is a powerhouse of ability.
With two simple commands, I can fully update my system and clean all residual files.

sudo apt update && full-upgrade

sudo apt clean && autoremove

Try doing that with a GUI with that kind of simplicity and speed.

Commands

When you install a package using a GUI installer, the installer runs the same APT commands that you would in terminal, only with more limitations. So using an installer will not add any benefit to avoiding Dependency Issues.
What installers or Package Managers (Like Synaptic) can do is organize your options and present them all in a neat layout that can be followed.
The vast majority of the time, when using the terminal, you are issuing commands in the terminal while following a guide that outlines what these commands are. You do not need to have them all memorized; Indeed, Linus Torvalds does not have all the commands memorized. What matters is not rote memorization, but in using the direct control over the system to fully ensure a safe and well operating machine.

The terminal is the best friend you ever had on a computer; allowing direct access to all parts and advanced troubleshooting and diagnostics. The terminal provides the type of interface that MS Windows sought long and hard to deny us, making the users rely on shoddy tech support and incessant internet searches to no avail.
I would hope that this thread will become a user contributed resource that lists Common Commands and Terminal tricks. But in the meantime, for all users; Please use the resource that the entirety of the forum offers to ask when in doubt.

5 Likes

I find it useful to write down commands or series of commands in a simple notebook to refer to when needed for specific tasks. That is especially helpful for occasional housekeeping tasks and running CLI utilities e.g. Rkhunter etc. Maybe this thread can also become a "notebook" of useful commands.

The CLI is powerful, but should not be frightning to the user. I would reitterate what others have mentioned on the forum elsewhere. Read the screen output carefully before clicking "Y".
It is like reading the small print of T&C's. Just take time to make sure you understand what you are committing to doing and you will be alright.

As I have limited disk space. In addition to cleaning apt, I use the following commands (from my notebook) to
recover space taken by journal files:

check disk usage:

journalctl --disk -usage

review:

journalctl -r

start new, archive old:

sudo journalctl --rotate

limit size to 100M and clean:

sudo journalctl --vacuum-size=100M

I hope I have written that correctly, or @Aravisian will correct me.

4 Likes

I think the biggest reason people fear the terminal is the theoretically infinite number of possible commands. In a GUI, the user will eventually find all the buttons and can eventually figure out which does what. But in a terminal, it is impossible to find all the possible commands (help command just confuses the user even more). That's why terminals are horrifying to new users. As a person who still doesn't like to use Terminal and will avoid it unless necessary, I have a great suggestion to improve it. Having a smart auto-complete system in the terminal that contextually helps the user figure out which commands are recommended/applicable. I don't know if there is an addon that could add this feature but if such thing does exist, that would turn the terminal into a thing that new users can actually operate, rather than needing to lookup on the internet for every command. If such thing exists, it would be neat to write a guide on how to add it to the system or even better, implement it in Zorin itself.

1 Like

I have seen that sort of thing before, but it is a poor compromise between GUI (multiple choice exam questions) and CLI (write an essay). It was not popular. Users still wanted the confines of a GUI with dropdowns and buttons.
Some use the Command Line Interface for almost all system interaction, wheras I find with Zorin that I am only using it for specific housekeeping tasks. However, I only have a fairly simple set of apps and do not change things around that much.

1 Like

Yes, there is an autocomplete addon for zsh which is mentioned in the thread for "Zorin spiffy terminal" linked above.
Or:

Opinions vary, as noted above, as to the effectiveness. :stuck_out_tongue:

1 Like

I never used it, I only have heard of it. I just now installed the autocomplete for zsh and... you gotta try this. Wow.

This may just qualify.

EDIT: A picture speaks louder:

1 Like

Looks great :drooling_face:

Summa summarum getting people de-afraid of the terminal. :+1:

3 Likes

That is true, but that discussion is a whole different can of worms :smiley:

That is true but a CLI is much more unintuitive than a GUI. Without this tutorial that you just posted above, I wouldn't have been able to operate this tool on my own. But if it was a GUI app, I definitely would've been able to figure the application out on my own.
I like having access to the CLI and being able to use it but I absolutely hate the idea of having it as the only option. It is outdated and borderline obsolete.

While I see your standpoint, I disagree with the idea that CLI goes far beyond what most GUI apps can offer. While that statement is objectively true in a lot of cases... I don't see it as something good. To me, it says that the design of that GUI is SO bad that people rather use the CLI. It Sounds like an insult to me :smiley:
Sadly the GUI design of MANY apps and even platforms are still totally outdated, obsolete, and as you mentioned, limiting.
It's a weird problem that I noticed instead of getting tackled and is often fought against. Instead of users uniting and pushing for a new and better GUI for everyone's benefit, people just want to stick the old and unintuitive CLI and sadly many Linux veterans declare it as the holy answer to everything.

To make an analogy, opening a CLI in Linux is like opening up the maintenance shaft in a house. I just want to install a new fridge in my house, I don't want to go into the maintenance shaft every time I want to add something new to my house and deal with the darkness and dirtiness of it. But I'd love to have the option to open the maintenance shaft when I want to. :smiley:

No, not at all.
What it is is that I firmly believe that users of the operating system should be Taught how to use something that is new and unfamiliar, rather than avoiding that process. I could make the statement that it is insulting to avoid teaching, as that may something about assumptions made as to the users capability.

Much of what is used on all computers, from MS to Linux to Mac is over 60 years old.
GUI + functions have been around for nearly 40 years.
Many hardware components have seen massive progress in design, allowing for far more data to be packed into smaller spaces. In spite of this, we still use the ancient language of binary. And cooling fans have been around for 70 years.
Often, things are used long term because they work.

I switched from Windows to Linux about two years ago. I had never used Linux before that. And in the beginning, I hated the terminal. I do not qualify as a Linux Veteran.
As I struggled to set aside my biases and learned how to use the terminal effectively, I began to realize the great benefits of it. For example, as a person that does graphical images and design, I can convert images from .png to .svg with One Single command in terminal producing an instant result. In a GUI app, the app must use a larger amount of resources and I must navigate the buttons it requires be set - it is less efficient, takes longer and can be more confusing. This is true in image batch converting too.
I began to prefer the terminal for its elegant simplicity, amazing efficiency and almost universal access to all tooling.
Where I started out hating the terminal because I did not know what to do; I now love the terminal as the most diverse and useful tool in my computing toolbox. There is nothing else anywhere near as empowering.
The trouble with a "New GUI" is in how one could be effectively designed that performs as the terminal does. I mean consider- How many menus, buttons and checkboxes would that mass of complexity have? You would need dozens of tabs at the top each populated with hundreds of options.
Have you ever used Blender? It is much less powerful a tool by comparison and yet is so loaded with GUI options, it can take a very long time to learn the basics on it and months to years to master.
G.I.M.P. is far simpler than Blender and I have been using it for about a year and a half and I still have not opened its fullest potential and learned all of its abilities.
A desktop GUI that replaces the versatility of the terminal would be an absolute nightmare - and this is the reason one does not exist.

I think this analogy limps because of its implications. I could alter the analogy to compare the Terminal to a Main Corridor of your home that allows fast and easy access to all rooms as needed. It need not be perceived as Dark and Dirty. It can have marble floors and be brightly lit.

1 Like

I pretty much agree with every thing you said. My wording in the previous post suggested that I am hating on the CLI but my intentions were the opposite. I want to pedal new and good GUI systems because the current ones are mostly horrible. It is mostly me hating the current GUI designs and trends rather than the CLI.
On a related note, yesterday I was trying out VIM and I was hoping I could use that as my main text editor and even IDE. I was hoping it could possibly change my stance towards GUIs and CLIs but Oh my lord.... what an interface :smiley: To say it was unintuitive is an understatement.
I really liked the cool shortcuts to do specific things and I liked the idea behind it but I grew frustrated with it as I realized how much time it requires for me to set it up and learn all of its shortcuts. But then I installed Kate and Kdevelop and I was immediately able to figure out what's what. I wonder if there are some VIM users here and what do they think of it. I'm really shocked by the VIM users as I've seen them prefer it to programs like Atom, VSCode, etc... Even by hobbyists and casual users.

p.s. I think we should move the posts above to another thread as they deviate from the original topic.

VIM kills me, too.
Nano, which is the default in Zorin OS, suits my terminal editor needs. But generally, I use GUI text editors a lot. I prefer Xed. Pluma and Mousepad are good, too. There is Geany as VS Code for more in depth work.
In general, for Linux, I believe in the user using what they prefer and what suits their needs the best. And over time, these preferences can change quite a lot. An example; Installation. For some it is Software Store, Others Synaptic and some, like me, primarily terminal. There are other options available, too.
While user preferences apply, I also believe that the terminal is the most essential utility on Linux; Like a culture or a monument or a movement of progress - It must be Preserved. As I can be opinionated as anyone, sometimes, it is more of a passion.
Users may apply their preferences and use their resources at will. Yet, also be encouraged to learn this powerful utility, practice it and respect it - so that they have the control and the ability when they need it. It bothers me a great deal when users wish to exclude the terminal, shun it, rather than learn it, even if it is not the first preference.
Much like a car, you may have many preferences of the car and use it your own way with your own style, but you still must learn how to drive it.

I was wondering this as well...
Note: Posts moved from Post 10 above to this post into this thread.

I think this topic is worth exploring in depth, as well.

Looking at a standard terminal:
std-term

There is not a lot there. No hints, really. It looks like it is asking for something, but what does it want?
That green text. It reminds me of a computer screen from the 1980's.
Flat. Drab. The major attention is on the text and only the text. Well... the text is the most important thing... Even so, it looks intimidating.
I think that in this case, especially for users migrating to Linux, appearance is very important.

Looking at my terminal window:

There is still the text based interface, but this appearance is more familiar. It looks more like the GUI apps that many users are more accustomed to. The system theme can vary, but the first impression between the two leaves the second one looking a little more friendly.
(For the curious, that blue I-beam is the mouse cursor.)
I use xfce terminal as it has far more options than the default Gnome.

sudo apt install xfce4-terminal

Then set as default. The xfce4-terminal can be used on any desktop environment.
You do not need to install xfce to get it.
Under Edit > Preferences > Appearance, you can set the colors, change the text colors and set any background you want. In my case, I made one that matches my system theme. I prefer toolbar enabled.
Much of the appearance you see is due to the use of powerlevel10k.

This works with zsh and with oh-my-zsh. With zsh, you can have:

  • Spellcheck
  • Word suggestions
  • Autocorrect
  • and other various features that can make the terminal more intuitive and helpful.

To install:

sudo apt install zsh

Follow the prompt to make zsh your default shell.
To install Oh-My-zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Now, you may want the add ons. For the word suggestions (Which I only recently installed myself and am finding to be the Most Useful - it has taught me several commands I did not know):

git clone GitHub - zsh-users/zsh-autosuggestions: Fish-like autosuggestions for zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Then add the plugin to ~/.zshrc by pasting this line at the bottom of the file:
plugins=(zsh-autosuggestions)
For Syntax Highlighting, which helps tell you if there is a typo and differentiates portions of the command by color:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

For Autocomplete, which helps prompt the command you are looking for and is very helpful to familiarizing yourself with the terminal:

git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git

Then add the plugin to ~/.zshrc by pasting this line at the bottom of the file:
plugins=(zsh-autocomplete)

With all that set up, you can install powerlevel10k

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Then set the plugin to ~/.zshrc by pasting this line at the top of the file:
ZSH_THEME="powerlevel10k/powerlevel10k"
Powerlevel10k requires a compatible font. kcaps made one that uses the Zorin Logo here:

He uses hacknerd. I prefer MesloGS, so I made my own with Zorin Logo using FontForge.
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf

Open a new zsh terminal and enter in p10k configure to set up your Powerlevel10k theme however you want it to be and to test that the font is working correctly.
Enjoy and please ask if any of the above gives you any trouble.

1 Like