If you totally get to the bottom of Linux shell – you’ll agree that it’s a powerful environment. Understanding of things like text manipulators, system utilities etc. makes a great deal in operations performance. But sometimes we have a desire to simplify command line toolkit. Days go by and we’re starting to notice that some mechanisms could be better. Command history search is complicated. “du” scrolling doesn’t show up a descriptive filesystem usage statistics. And sometimes instead of command line we’re picking GUI programs. Despite of we know this way as less productive.
But here is the simple rule: if you need a feature – invent it yourself! Some developers are going that way turning Linux from powerful into unbelievable powerful. Inspired by awesome-shell list I pointed the most useful and put it together at this post. Hope most of them should work on Mac OS environment too. So, here is my ranking. Don’t pay attention on numbers, this range is chaotic. This post could look too long for you. In that case just scroll down and look at the nice shell screenshots (joke sucks, i know).
The point: single bash script allows to point bookmarks on favorite directories. What it takes if your working directories have a huge path needs to be typed every time.
Alternative to: alias.
Github project: huyng/bashmarks.
The point: helps you to go down on the filesystem tree to desired directory. Using great if you wish to climb up through many directory levels simultaneously.
Alternative to: cd ../../../../..
Github project: vigneshwaranr/bd.
The point: single script which lets to pick many patterns with different colors at the same time. Based on “ack” tool. Looks more flexible than grep.
Alternative to: grep –color.
Github project: paoloantinori/hhighlighter.
The point: command history navigator. Much more visual than default reverse search. Also runs by “Ctrl + R” command.
Alternative to: reverse search (Ctrl + R)
Github project: dvorka/hstr
5. fuck (thefuck)
The point: as funny as important utility which remarking typos you did in previous command and run it. You might heard about “thefuck”, because it’s really popular program.
Alternative to: basically there is no alternative. Sometimes bash or fish can help you by prompt, but it’s a rare case.
Github project: nvbn/thefuck
The point: colorization of MySQL command prompt. Makes query results pretty articulate.
Alternative to: colour-mysql-console (external too).
Github project: mysql-colorize.bash
The point: the best lines of code counter. Accepts all popular and unpopular programming languages, splits “real code” from comments and blank. Easy to install, easy to use, hard to confuse, for project analysis priceless use. Hope you know this program but I couldn’t go around this.
Alternative to: plenty of alternatives
Github project: AlDanial/cloc
The point: mounts remote host filesystem allowing to exchange data through ssh. Priceless if you want to edit files directly from your machine with immediate results. All folders will be synced, that’s great for Vagrant fans.
Alternative to: NFS and FTP connections.
Github project: osxfuse/sshfs
The point: powerful monitoring utility. Explains all walks of your system in one window. Written in Python. Also supports client-server mode which seems a great opportunity to track remote hosts.
Alternative to: top/atop/htop.
Github project: nicolargo/glances
The point: hybrid of “ping” and “traceroute”. Allows to keep an eye on each hop routes your traffic. Provides useful statistics and helps to define problem in your network.
Alternative to: ping, traceroute and ping with traceroute together
Github project: traviscross/mtr
The point: default GNU command line multiplexer. Helps to lead multiple sessions. The most useful appliance – keep many remote SSH/Telnet connections at the same place. Management through hotkeys (mostly “Ctrl+A” with something). Of course, you know what screen is and probably know how it works. But, as sure as mtr and cloc, I can’t skip it in Linux utilities report. There is a wide choice of screen multiplexers like tmux or byobu. But I’m learning “screen” usage and recommend you too. We need to be friendly with GNU tools, because it’s a headspring of open source empire. Democratic empire. Repeat one more time: GNU/Linux, not only Linux.
Alternative to: byobu, tmux, wemux.
Github project: actually not. Use GNU repository: git://git.savannah.gnu.org/screen.git.
The point: shows up your filesystem components amount using command line graphic. Definitely effective if you have a lack of free disk space and try to find out objects which take too much memory. Looks much more representative than “du” command.
Alternative to: du
Github project: actually there is no official GitHub repo. If you’re interested – go to the project website.
The point: supports local and remote folders synchronization. Looks like “git” and “rsync” hybrid. You’ll love it if you have a git addiction and try to make any operation using CVS.
Alternative to: rsync, git and rsync with git together.
Github project: sickill/bitpocket
The point: Python project as a new kind of HTTP command line client. Represents HTTP requests toolkit, supports all kinds of messages, HTTPS protocol as well. Prints out result in JSON format if your command includes data. Colorful and looks articulate. Header customization is permitting too. The most awesome tool for webserver troubleshooting or just for website interaction.
Alternative to: curl
Github project: jkbrzt/httpie
The point: interactive replacement of AWS console. Saves your brain from thouthands of command options replacement. Take in in your cloud!
Alternative to: just stay on AWS CLI.
Github project: donnemartin/saws
The point:simple script based on curl. Helps to push files on the fly to the transfer.sh hosting. Takes like air if you’re working on isolated environment (RDP, KVM) and trying to ship text file. It could be a log, piece of code, basically whatever is worth to your destination person. Also you can change a hosting location to yours. Amazon S3 buckets supported.
Alternative to: curl, many copy/paste drudgery.
Github project: dutchcoders/transfer.sh/
The point: defines your location by freegeoip.net. Based on node.js. There is a choice of formats: latitude/longitude coordinates, city/country format, JSON. Useful if you want to know where is your remote host located or if you got lost in the jungle. Also you can check the result of IP address substitution by any means and by all goals.
Alternative to: “dig +short myip.opendns.com @resolver1.opendns.com”
Github project: rafaelrinaldi/whereami
The point: smart shell script parser, detecting errors and unlogical operations. It’s just one of multitudinous tools for bash testing. If you’re developing shell scripts – that’s the way to organize it productively. If Bash is not a fully functional language by Alan Turing rules – it doesn’t mean that you cannot debug it.
Alternative to: assert.sh, ts and many miscellaneous testing tools more. And, of course, bash -x
Github project: koalaman/shellcheck
The point: helps to collect all configs (.bashrc, .gitignore etc.) in the single directory. Other dotfile management tools could be more comfortable for you. The main thought of this – start to keep an eye on your dotfile configs. They can spawn and turn your home directory into the big trash warehouse. Also that’s a great backup in case of emergency.
Alternative to: fresh, homeshisk, vcsh for the same goal
Github project: svetlyak40wt/dotfiler
The point: Python bot diving into web-page and downloading all images has been found. Suggesting to set a limit on file size, images number and manky kinds of other through options. Such useful if you want to grab all images from any webpage, but have to save it manually one by one. That takes a lot of time.
Alternative to: few GUI utilities, but we know what’s better, right?
Github project: sananth12/ImageScraper
You may want to try it all, but don’t have any time and desire to go through 20 installation processes. So, here is my attempt to collect it all in a single bash script. I tried to make it interactive, so make a choice, what install and what’s not. You can install everything described there by single script execution. Here is some command line apps included, but I’d like to make another post about it. Also I didn’t include any special tool for Git. They’re also awesome to organize your interaction with CVS. But now single git command is really enough for me, thus I can’t suggest anything at present. Hopefully I’ll write about them in the future.
You probably lost your jaw looking at features which Linux developers community provide. But there is no limit: we can improve shell productivity anytime by any side. Hope this post amazed you and inspired to developing new command line instruments.