Miner.farm Crypto Currency Community Forum

Browse and post your favorite coin/crypto news, miner.farm and PiMP OS updates and announcements, mining guides, overclocking tips, and more...

Quick Links

7 utilities to improve your ssh sessions

  • Beta Team

    Lots of you login to your PiMP machine (say that in public! I dare ya!) via ssh and the only thing you ever see is the command line. Lots of you only ever need the tools provided by the PiMP dev-team (pimp, gputool, pimpup, etc) to do your thing and logout. Some of you do other things in that shell (or the GUI terminal.)

    If you are the first type, feel free to skip this post and go about your day. If you are the second type, but haven't explored options to improve your experience in shell, this post is for you.

    I spend a lot of time on a linux command line. Lots of that time is spent using alternatives to GUI tools for a variety of purposes and reasons. Also, lots of that time is spent doing various tasks around the file system. These are some tools to make your life on the commandline more better.

    Most of these tools are not in the apt repositories. It sucks, I know, but there's another way to get most of them without fussing with tracking binary-installs or compiling software. Some really bright people wrote a bit of software called Homebrew; originally to get linux software easily onto Macs. It was later ported to linux because software in default repositories is often out-of-date, or not available at all. That is especially true of Debian- and Ubuntu-based linux distributions, like PiMP. The Homebrew website explains how to install it right at the top of the page.

    NOTE: The script will refuse to run as root, for good reason! You should not be doing anything as the root user. That is extremely bad system management practice. Create a new user account with useradd and grant that user sudo privilege with visudo (familiarize yourself with editing in vi first!). Then logout and relogin as your new user and re-run the installation script. In the future, always login as an ordinary user. You can still do sysadmin tasks by prepending root-required commands with sudo.

    Using it is easy. Once installed, try a brew help for nice overview.

    Most of the utilities below are available through brew.

    Terminal Utilities


    ( https://github.com/ogham/exa )

    You will never go back to using boring ls after installing this. It's faster, despite ls being a shell built-in, and it's prettier. Your ~/.userrc file superceds ~/.bashrc, so you can safely duplicate your favorite ls aliases to use exa. The command flags are different, though, so do read through the documentation. Or just experiment.

    It's not available in apt.
    brew install exa


    ( https://github.com/jarun/nnn )

    It's a file-browser in text mode. It will save you lots of cding. It has fancy plug-ins which allow you to view different files without opening them in an editor. It has different 'contexts,' which makes it easier to do things like symlink, move and copy files.

    It's in the apt repositories, but a newer version is available from linuxbrew.
    apt install nnn or brew install nnn


    ( https://github.com/junegunn/fzf )

    Fuzzy-finding in the filesystem and many other places. There's a vim plugin. It works with tmux. Most important, it works with nnn if you install the right plugin. See nnn plugins in the nnn documentation.

    It is awkward right out-of-the-box. Study the README at github to learn how to set up completion in bash. It takes some configuration to make it really friendly.

    It's not in the apt repos. It is in linuxbrew:
    brew install fzf


    ( https://github.com/tmux/tmux )

    The very first thing I type when I ssh into any of my computers, whether PiMP box, other miner, or a server is tmux a. Yes, even if I had just restarted the machine. tmux, for me, automatically starts at boot and reloads its previous session(s). Try doing that with screen.

    Seriously. Install this. screen sucks rocks and the only reason anyone still uses it is because it comes preinstalled on every linux or BSD system in the world. tmux is less resource-intensive, faster/more responsive, and comes with more bells and whistles, including a plugin system. Install it. Use it. Love it.

    If you ask nicely, I'll write up some more on configuring tmux, but the manpage is gospel.
    (tip: you can get tmux to display some conky things in the panel, which is great if you hate that slow command prompt provided by default on PiMP. screen definitely can't do this.)

    The version available from apt is really old. The latest version has a much more friendly internal help representation. The latest version also has a more consistent configuration syntax.
    brew install tmux


    ( https://github.com/walles/moar )

    I love less but it has it's failings. moar does what less and more do, and moar. :-P
    Install it and put in your ~/.userrc: export PAGER=/usr/bin/moar. alias less to point at moar.

    It also renders markdown, for those miner helpfiles that are full of
    '[i am text] (follow_my_link_to_the_end_of_the_world)'.
    It renders PDF, if the PDF was made correctly with text instead of images to represent the pages. The PDF redering isn't pretty, but you can read it. Some of the miner-soft documentation is only around as PDF, so this could be important to you.

    (tip: for better PDF-joy, the apt package 'poppler-utils' includes pdftotext and pdftohtml.
    apt install poppler-utils)

    If you've already configured less to display colors, moar uses the same configuration, so it'll just grab your less colors and use 'em. It does benefit from having highlight installed (in apt repos, or linuxbrew), but it's not necessary.

    Like most of these utilities, you won't find it in apt. It's the only utility in this list you can't get with linuxbrew. Follow the instructions on the github README about how to install it. Probably somebody will write a brew formula for it. Heck, maybe I will. Maybe. Probably not, though.


    ( https://w3m.sourceforge.net )

    w3m is a web browser and pager (like less, more, and moar.) While I greatly prefer links for web browsing in text mode, w3m is very respectable and, in some ways, superior. However, the real reason for recommending w3m is because it works from within nnn with the right plugin. And, if you choose not install moar, w3m is still a better pager than less.

    A reasonably up-to-date version is in the apt repositories. You can just apt install w3m to get it. Of course, you can also get it from linuxbrew if you want the latest version.
    brew install w3m


    ( https://github.com/BurntSushi/ripgrep )

    It's like find, awk (for search), and grep but oh so much faster! Maybe you don't care. Great. Good for you. It integrates with nnn if you activate the plugin; and grep doesn't. Install it.

    As usual, it's not in apt.
    brew install ripgrep

    Be advised, the binary installed is rg, not ripgrep.

    GUI bonus


    ( https://github.com/thestinger/termite )

    If you login to your PiMP machine in the GUI, or with VNC, you are presented with lxterminal. lxterminal is a serious workhorse. termite is leaner, meaner, and more capable in terms of display resolutions, colors, and UTF-8 font support. It starts faster, displays faster, eats less RAM and CPU cycles. It has tabs and all the other fancy-fu modern terminal features but, who cares? It's fast and lean!

    It's not in apt.
    It's also not in linuxbrew.
    You have to grab a binary from github, or compile it yourself.


Want 10% more hash from your rigs?

We promise to keep your email safe and never spam you.

© 2014-2020 Miner.farm | By Miners, For Miners | Portable Instant Mining Platform, LLC