Run Linux shell commands sequentially

http://yalneb.blogspot.com/2017/02/run-linux-shell-commands-sequentially.html

It is possible to concatenate Linux shell commands using either && or || or ;.
  • && Run second command if the exit status of the first command is successful.
  • || Run second command if the exit status of the first command is not successful.
  • ; Run second command no matter what the exit status of the previous command.
As shown in the figure above, this can become very handy to concatenate Linux commands depending on their exit status, specially if the first command is rather slow and you do not want to wait for it to finish. For example, I use && all the time to compile some source code from the terminal and run it as soon as it finishes.

Note that you can run an arbitrary long number of commands sequentially, so go out and play while you leave your workstation finish a batch of commands.

Colorize your terminal bash prompt

http://yalneb.blogspot.com/2016/05/colorize-your-terminal-bash-promt.html
Do the colors of your terminal confuse you when trying to separate your bash promt from your commands and text output? Or are you simply bored of your terminal? Then spice things up with this bash script. Also, your productivity will benefit a lot from it.

I use bash colors in my prompt for:
  • Better identify my bash, my commands and terminal output
  • Identify each host my color to avoid confusions
  • Warn me with a bright color when logged in as root
  • Give my terminals a personal touch

Fix a messed up terminal

http://yalneb.blogspot.com/2016/05/fix-messed-up-terminal.html

In the last ten years I have encountered this situation over a broad spectrum of distribution and terminal: line wrapping gets totally messed up and starts erasing and mixing with the previous line. And although the terminal still executes the correct commands and not the mashup it is showing, it is quite frustrating.

TMUX: better mouse support

http://yalneb.blogspot.com/2016/05/tmux-better-mouse-integration.html


Continuing my TMUX series, this time we will add better mouse support to your TMUX. (I also works over SSH if your local machine has a mouse).

You will add following functionality to your mouse:

  • Resize panels draging on borders
  • Select active panel with left click
  • Zoom panel with right click
  • Create window with right click on status bar
  • Drag and interchange panels
  • Drag windows
  • Close panels with mouse-wheel click
  • Close windows on the status bar with mouse-whell click

TMUX: sleek theme

http://yalneb.blogspot.com/2016/05/tmux-sleek-theme.html

I have talked about TMUX in my previous post. It is an awesome tool that can increase your productivity exponentially. How ever, it is extremely ugly and distracting if you use the default theme.

It is difficult and very subjective to explain something visual, but I have come up with a simple, minimalist, futuristic and sleek theme that works great whether your terminal supports 256 colors, or only 16.

Do not worry, you can install my theme in less than 15 seconds and enjoy it right away.

TMUX: get some juice out of your terminal

http://yalneb.blogspot.com.es/2016/05/tmux-get-some-juice-out-of-your-terminal.html

TMUX is sysadmin's black magic.

If you ever had to remotely log into one fo your servers (or even your raspberryPi), you know how annoying it is when you want several terminals: either you open locally several terminals and log in each of them over SSH, or you simply surrender.

In the same context, I am sure you had to run a lengthy command on the remote machine, but could disconnect because that would kill the remote process nor change from one computer to another while sharing the remote session.

If you identify your self with this, then call 555-get-me-tmux and order now! (or better yet, continue reading)

Dotfiles: sync your linux configuraiton

http://yalneb.blogspot.com.es/2016/05/dotfiles-sync-your-linux-configuraiton.html

Dotfiles are how you personalize and configure your system. Be it your bashrc file where you write your favorite aliases or run scripts, or your program's user configuration.

Instead of reconfiguring each of your machines independently, you could manually copy all dotfiles from one to another. Or... you could sync your dotfiles to github and use this simple script to link them in place.