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 need a simple open source cross-platform command line tool that converts web pages and HTML to a PDF file? Look no further, try wkhtmltopdf.

{ 15 comments }

The remark command is a little know tool that can be used to color syslog file as well as output of of programs such as ping, traceroute, and much more.

{ 8 comments }

Most embedded Linux / BSD systems such as routers, servers and nas devices comes with console interface (serial port with RS-232). BIOS can uses this, and after boot BIOS screen I/O is redirected so that you can use the device. RS-232 is also used for communicating to headless server, where no monitor or keyboard is installed, during boot when operating system is not running yet and therefore no network connection is possible. You need to use a serial cable between your computer and embedded system or server. In this post I will cover five conman utilities used for serial communication under Linux / Unix / *BSD and Mac OS X.

{ 10 comments }

The pv command allows you to see the progress of data through a pipeline. It provides the following info:

  1. Time elapsed
  2. Percentage completed (with progress bar)
  3. Current throughput rate
  4. Total data transferred
  5. ETA

{ 2 comments }

Process identifier (PID) is a number used by Linux / Unix kernels (and Windows operating systems) to identify a process. Usually, new processes are created using the fork() system call. Each PID (or so called tasks) can be monitored under Linux. In this quick tutorial, I will explain how to use the pidstat command for monitoring individual tasks currently being managed by the Linux kernel.

{ 4 comments }

Everything is a file under Linux and ls* and friends can help you to dig out more information from the system than you originally thought.

{ 15 comments }

Using the same password on different servers allows attackers to access your accounts if cracker manage to steal your password from a less secure server. This is true for online website accounts too. So solution is to create unique passwords for server accounts like your email, sftp and ssh accounts. General guideline to create a strong and unique password is as follows:

{ 2 comments }

Dear nixCraft,

I just want to know how to run Linux commands as another user or as root user?

Sincerely,

Confused About Linux commands.

{ 8 comments }

Ever want to list all the Linux commands (including bash shell aliases and functions) you could run on the server / workstation? Look now further. Try compgen command.

{ 9 comments }

You can display man pages in colors. Similarly, you can display info pages in colors. The info command is used under Linux or Unix to read multipage documentation and act as help viewer working on a command line interface, useful when there is no GUI available on the server. The info command processes info files. All info files are are in Texinfo format. You get the documentation tree. pinfo is a little known tool that can display info pages in colors.

{ 0 comments }