Essential Command-Line Utilities for Linux

Every Linux user needs to know to use a few command line tools. Most linux's have quite a few internal commands installed by default, but sometimes there are some tools that you probably need to install that can be very useful. These are a few that we at Clustered Networks use on a regular basis that we fine helpful in Linux desktop and Server Administration.



1. terminator

At its simplest Terminator is a terminal emulator like xterm, gnome-terminal, konsole, etc. Terminator is a an alternative terminal for Linux that comes with a little additional features and functionality that you wont find in the your default linux terminal application. Some of terminator's features are....

  • Arrange terminals in a grid-like structure
  • Tabs
  • Drag and drop re-ordering of terminals
  • Lots of keyboard shortcuts
  • Save multiple layouts and profiles via GUI preferences editor
  • Simultaneous typing to arbitrary groups of terminals
  • Extendable through various plugins
# sudo apt install terminator

To launch terminator simply type:

# terminator

2. neofetch

Neofetch is a command-line system information tool written in bash 3.2+. Neofetch displays information about your operating system, software and hardware in an aesthetic and visually pleasing way.

The overall purpose of Neofetch is to be used in screen-shots of your system. Neofetch shows the information other people want to see. There are other tools available for proper system statistic/diagnostics.

Another cool feature about neofetch, is that it is highly customizable via the use of command-line flags. There are over fifty configuration options available to you.

# sudo apt install neofetch

To launch neofetch simply type:

# neofetch

3. htop

htop, a cross-platform interactive process viewer much like to old "top" command. It is a text-mode application (for console or X terminals) and requires ncurses.

# sudo apt install htop

To launch htop simply type:

# htop

4. glances

Glances is a cross-platform monitoring tool which aims to present a maximum of information in a minimum of space through a curses or Web based interface. It can adapt dynamically the displayed information depending on the terminal size.

It can also work in client/server mode. Remote monitoring could be done via terminal, Web interface or API (XMLRPC and RESTful).

glances allow users to set thresholds (careful, warning, and critical) contained in a configuration file and displayed in colors.

  • Green – OK (everything is copasetic)
  • Blue – Careful (needs attention)
  • Violet Warning (alert)
  • Red – Critical (critical alert)

Installation of glances is simple on Ubuntu or Debian:

# sudo apt install glances

To launch glances simply type:

# glances

5. chkrootkit

chkrootkit - locally checks for signs of a rootkit. A rootkit is a clandestine computer program designed to provide continued privileged access to a computer while actively hiding its presence. ... Today rootkits are generally associated with malware – such as Trojans, worms, viruses – that conceal their existence and actions from users and other system processes. In other words it checks to see if your system has been compromised.

# sudo apt install chkrootkit

To launch chkrootkit simply type:

# chkrootkit

It is best to run this script daily by editing the configuration file and setting up a cronjob.


6. ncdu

Ncdu (NCurses Disk Usage) is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don't have an entire graphical setup available, but it is a useful tool even on regular desktop systems. Ncdu aims to be fast, simple and easy to use.

# sudo apt install ncdu

An example usage of ncdu would be to view your webroot directory:

# sudo ncdu /var/www/

7. vnstat

vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won't actually be sniffing any traffic and also ensures light use of system resources regardless of network traffic rate.

# sudo apt install vnstat

An example usage vnstat would be to view daily use of traffic on your server:

Options we like to use at Clustered Networks.

  • -h (Hourly Report)
  • -d (Daily report)
  • -m (Monthly Report)
  • -t (Top Daily Reports)
# sudo vnstat -d

8. wttr.in

This is not really a command-line utility, as it is a convenient way for developers and system administrators to quickly and conveniently check the weather or to add it to one of your scripts.

wttr.in is a console-oriented weather forecast service that supports various information representation methods like terminal-oriented ANSI-sequences for console HTTP clients (curl, httpie, or wget), HTML for web browsers, or PNG for graphical viewers.

To get your weather, use the curl command (command line tool and library for transferring data with URLs) , specify wttr.in, and then your location as in the example below.

You can also us Fahrenheit / Celsius Switches

  • ?u - USA / Fahrenheit (USA)
  • ?m - Metric / Celsius (The rest of the world)
# curl wttr.in/Toronto?m

9. cheat.sh

  • Unified access to the best community driven cheat sheets repositories of the world.
  • Concise — It should only contain the things you need, and nothing else.
  • Fast — It should be possible to use it instantly.
  • Comprehensive — It should contain answers for every possible question.
  • Universal — It should be available everywhere, anytime, without any preparations.
  • Unobtrusive — It should not distract you from your main task.
  • Tutoring — It should help you to learn the subject.
  • Inconspicuous — It should be possible to use it completely unnoticed.
# curl cheat.sh
# curl cheat.sh/rsync

Enjoy!

Clustered Networks

Located in Edmonton, AB Canada, Clustered Networks was Incorporated in 2001 and has offered Network / Internet and IT Consulting services for over 20 years. We offer personalized service! Call Us Today! - Click Here for our Contact Info

#linuxutilities #terminal #linuxcommands

Posted in Linux Desktop Tips, Linux Network Admin Tips, Tech How To on Jul 06, 2021