I Install these Linux Terminal Apps on every system

Configurare noua (How To)

Situatie

When I use Linux, I practically live in the terminal. As with any living space, I like to add my own touch when I move into a new place.

Solutie

Vim

Editing a text file in Vim in the Linux terminal.

If you use the Linux terminal, you’re going to need an editor. My favorite happens to be Vim. It was the first “Unix” editor (though it didn’t start out that way) that I learned. It was actually on macOS, back when it was still called “Mac OS X.” Nowadays, Debian and Ubuntu are my weapons of choice, either by themselves or as part of the Windows Subsystem for Linux.

I then switched to Emacs for a long time, but I eventually came back to Vim. The main reason was that using the Emacs key bindings on a new laptop I bought felt physically uncomfortable. The laptop keyboards these days seem to favor the spread-out “Chiclet” style. Vim’s commands, largely inherited from Vi, felt more comfortable to me, as they are based around the home row.

A lot of people complain about Vim’s modality, or the ways control is split between the “command” and “insert” modes. This is why being unable to quit Vi or Vim has become such a meme.

I also prefer Vim’s simplicity compared to Emacs. While it’s fun to have a Tetris game, a terminal emulator, and an on-call therapist in my editor, I just prefer my trxt editor to be a text editor. I like to get in and get out, and Vim suits my style better.

most

Viewing the manpage of the "man" command in Most in the Linux terminal.

Apart from an editor, I also have a favorite tool: a pager. No, not one of those antiquated devices from the ’90s, but a program that lets me look through text files. most is my pager of choice. The biggest use is for reading manpages.

The main reason I use most is just because I think it looks good.

I like how it highlights headers, which makes it easier for me to navigate manpages. Manpages are notoriously walls of text, so anything that can help me get through them is useful. The highlighting makes them easier to spot, but the forward and backward commands are the primary way I search through documents.

Oh My Zsh

zsh with Oh My Zsh ls -l listing of .oh-my-zsh directory in the home directory.

zsh happens to be my shell of choice because it offers so many features. It’s one of the first things I install on a brand-new Linux system. The Oh My Zsh project makes it even better.

All I have to do is install zsh and then paste in the Oh My Zsh installation script. You’ll have to have git and either curl or wget installed to be able to run the script, but these are easily installed through a package manager.

I can then tweak the resulting .zshrc file to customize zsh even more. I use the “lukerandall” theme. You’re better off using predefined themes because shell theming on its own is complicated, and you might step on Oh My Zsh’s toes if you try to change something that’s being managed by Oh My Zsh. I just happen to like the way that this theme looks. The project’s wiki has a page full of themes to choose from.

I still usually need to make a few tweaks to the .zshrc file on a new system. I’ll set the editor and the pager using environment variables to Vim and Mosh mentioned earlier;

export EDITOR='vim
export PAGER='most'
Editing the .zshrc in Vim.

The modified .zshrc that Oh My Zsh supplies has some options you can uncomment and modify. You uncomment a line by deleting the “#” character. I like the autocorrect option. If you make a lot of typos like I do when using the shell, this can save you from having to rerun the command.

I also typically set some aliases, such as setting some shortcuts to favorite SSH servers, as well as running other commands. One of the latter is fortune, which I’ll mention later.

Mosh

A session on a remote machine in SSH in the Linux terminal.

Mosh is more of a tool for connecting to remote SSH servers than a tool for use on local terminals. What I like is that Mosh will stay connected over flaky Wi-Fi connections. If the connection drops, it will still echo characters on the terminal. When the connection comes back, I can keep going as if nothing happened.

Another thing I appreciate is how the Ctrl+C command works. If you’ve ever tried this over a conventional SSH connection, you’ve probably experienced a delay between issuing the command and the program aborting. This is a bad thing if you’ve started a command and realize it’s what you didn’t want, and you might be risking data loss. Mosh makes SSH use much safer.

Mamba, NumPy, and Friends

Creating an array of random numbers and taking the mean with NumPy in an iPython session in the Linux terminal.

I’ve been interested in data analysis for a while. I was inspired by the availability of libraries for statistics to brush up on the subject, which had been limited to an introductory community college class that I’d completed over 20 years ago.

I picked up some Schaum’s Outline books, and since I’d already had some experience with Python, this seemed like a good place to start.

Many Linux systems already include Python in their default installations, but this is meant more to support programs that depend on it. On mainstream distros, they’re usually older versions. It’s possible to install newer versions by compiling from source, but then I would be replacing the system version. Again, a lot of utilities depend on it, so I don’t want to mess something up if a program depends on a specific version of Python.

Mamba is a tool that is indispensable. Mamba is a package manager that lets me install isolated environments. It’s a version of the conda package manager, already popular in the data science community, re-implemented in C++. This allows me to install a newer version of Python right on top of the old one without changing the base system. I can also install other libraries like NumPy and SciPy, which offer lots of statistical calculations. This setup is a full replacement for my old graphing calculator from college.

Tip solutie

Permanent

Voteaza

(0 din 0 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?