Tools you might want to check out

Introduction

There are tools out there that can make your workflow much, much smoother. This is a small list of some of the tools that I’ve found useful throughout my stay at Vanderbilt. They have significantly improved my workflow, and have made the projects much easier to understand.

htop - An interactive viewer for Unix

For viewing which processes are running on your computer and how much memory is left, I like to use htop.

This application, as shown in

htop running in the terminal

Figure 1.1: htop running in the terminal. Credit: Wikipedia

This tool is extremely useful when running multiple jobs, since it lets you see which jobs are running, for how long they’ve been running, and more. Figure Fig-1.1 how htop looks whenever you run this from the terminal:

htop

htop Explained

htop has different things to offer. Figures Fig-1.2 and Fig-1.3 explain what each column means.

_images/htop_top.png

Figure 1.2: Top of htop. This figure shows the different components in the upper part of htop. Credit: CodeAhoy

And the bottom part …

_images/htop_bottom.png

Further Reading

For a more in depth discussion of the different sections of htop, see:

tmux and screen - Terminal Multiplexers

Two other great tools that you should get familiar with are:

These two tools are essential when working on the terminal for a long time. Assume you have a script that takes a long time to complete. If you dedice to go for dinner, or leave school to go home, you would have to stop the script since it wouldn’t be running anymore.

Screen

The screen program allows you to multiple virtual windows in Unix.

Some of the features of screen are (from this page ):

  • If your local computer crashes or you lose the connection, the processes or login sessions you establish through screen don’t go away
    • You can resume your screen session with the command: screen -r
    • In some cases you may have to manually detach your screen session before resuming it.
  • The screen program creates multiple processes instead of multiple Unix login sessions, which means that it is resource-efficient.
  • You can cut and paste between different screens without using a mouse. Thus, you don’t need to be on a computer with a windowing environment such as macOS, Windows, or the X Window System.
  • It has a block copy feature which is similar to the kill rectangle feature of Emacs.
  • You can copy and paste more than one page at a time, which you cannot do with some clients. You can scroll up more than one page, depending on how many scrolling lines you have set with the -h option.
  • Using the detach feature, you can save screen processes when logging out and resume where you left off, saving the trouble of restarting them.

A useful set of commands for using screen are:

Command Purpose
Ctrl-a c Create new window (shell)
Ctrl-a k Kill the current window
Ctrl-a w List all windows (the current window is marked with “*”)
Ctrl-a 0-9 Go to a window numbered 0-9
Ctrl-a n Go to the next window
Ctrl-a Ctrl-a Toggle between the current and previous window
Ctrl-a [ Start copy mode
Ctrl-a ] Paste copied text
Ctrl-a ? Help (display a list of commands)
Ctrl-a D Power detach and logout
Ctrl-a d Detach but keep shell window open

For some useful tutorials, see:

Tmux

For further reading and tutorials, see these: