≡ Menu

Command Line Tips and Hacks

Command line tricks, tools, tips and hacks to help you get the most out of the shell prompt in Linux, *BSD, Apple OS X and Unix like operating systems ( rss feed ) .

Do you want to display a super cool logo of your Linux distribution along with basic hardware information? Look no further try awesome screenfetch and linux_logo utilities.

You can use the following tools to see how long system has been running on a Linux or Unix-like system:

  • uptime : Tell how long the server has been running.
  • lastt : Show the reboot and shutdown time.
  • tuptime : Report the historical and statistical running time of system, keeping it between restarts. Like uptime command but with more interesting output.

Collecting Ubuntu Linux System Information

For new computer or Laptop or server, I need to collect the information about its hardware. This is also useful when you need to replace a disk or memory with a vendor. In order to replace hardware you need all information in advance. In this post, I'm going to list commands that you can use to collect the hardware information.
Ubuntu Linux Server Collecting System Information

Learning bash scripting for beginners

Bash (Bourne-Again SHell) is a Linux and Unix-like system shell or command language interpreter. It is a default shell on many operating systems including Linux and Apple OS X. If you have always used a graphic user interface like KDE or Gnome or MS-Windows or Apple OS X, you are likely to find bash shell confusing. If you spend some time with the bash shell prompt and it will be difficult for you to go back.

Here are a list of tutorials and helpful resources to help you learn bash scripting and bash shell itself.

On a Linux or Unix-like systems each user and process runs in a specific environment. An environment includes variables, settings, aliases, functions and more. Following is a very brief introduction to some useful shell environment commands, including examples of how to use each command and setup your own environment to increase productivity in the command prompt.

20 Unix Command Line Tricks – Part I

Let us start new year with these Unix command line tricks to increase productivity at the Terminal. I have found them over the years and I'm now going to share with you.

If you want to monitor network throughput on the command line interface, use nload application. It is a console application which monitors network traffic and bandwidth usage in real time. It visualizes the in and outgoing traffic using two graphs and provides additional info like total amount of transferred data and min/max network usage.

Linux and Unix are multitasking operating systems i.e. a system that can run multiple tasks (process) during the same period of time. In this new blog series, I am going to list the Linux and Unix job control commands that you can use for multitasking with the Bash or Korn or POSIX shell.

You can dump Linux or Unix server memory. This is useful for forensics analysis, and testing your own system. This is often desirable to see:

  • What code and what data actually resides in memory.
  • You can search for specific pids memory.
  • Search memory for string and other data such as passwords.
  • Works as add-on tool for gdb and others.
  • Search/replace/dump memory from running processes and core files.
  • All kinds of deep hacking activities that simply saves your time and solve problems.

nicstat-welcomeThe nicstat command is top like utility for network interface card (NIC). It displays information and statistics about all your network card such as packets, kilobytes per second, average packet sizes and more. It works under Solaris and Linux operating systems.

In this post, I will explain how to install and use the nicstat command to find out stats about your NICs under Debian / Ubuntu / RHEL / CentOS Linux operating systems.