Linux / Unix Command Examples

Here are links to some useful Linux tips:

Awesome. VIM “for people who don’t want to use it , but have to…”. Or see my page

sudo is the right choice for granting admin rights on the CentOS Linux 8 server. Learn how to create a new user and grant her admin rights


  1. Tomi Engdahl says:

    How can I run a command called foo, and have it timeout/abort after 10 seconds under GNU/Linux running bash shell or script? How do I run the command under an alarm clock?

  2. Tomi Engdahl says:

    CentOS Linux 8.1 (1911), derived from Red Hat Enterprise Linux 8.1 Source Code released. Happy upgrades!

    #sysadmin #opensource #linux

  3. Tomi Engdahl says:

    Many Linux user dual boot Linux with Windows 10/8.1 or wipe out install Linux. However, sometimes you need Windows 10, and here is how to find out your original Windows 10 OEM product key using Linux for various reasons. #sysadmin #IT

  4. Tomi Engdahl says:

    Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000:

    php -S

    python3 -m http.server 8000

    python2 -m SimpleHTTPServer 8000

    ruby -run -ehttpd . -p8000

  5. Tomi Engdahl says:

    perl -MIO::All -e ‘io(“:8080″)->fork->accept->(sub { $_[0] < io(-x $1 ? "./$1 |" : $1) if /^GET \/(.*) / })' # multiforking CGI & static server in one line of Perl

  6. Tomi Engdahl says:

    Writing Safe Shell Scripts #Unix #Linux #BashShell

  7. Tomi Engdahl says:

    How to use parallel ssh (PSSH) for executing ssh in parallel on a number of Linux/Unix/BSD servers

  8. Tomi Engdahl says:

    Bash For Loop Examples

    How do I use bash for loop to repeat certain task under Linux / UNIX operating system? How do I set infinite loops using for statement? How do I use three-parameter for loop control expression?

  9. Tomi Engdahl says:

    {Updated} How to list / view various cron jobs on your Linux or Unix-based system. Now explains how to list jobs from systemd.timer under modern Linux distros too ;)

  10. Tomi Engdahl says:

    [Update] 25 Outstanding Backup Utilities for Linux Systems in 2020

  11. Tomi Engdahl says:

    If you are configuring a high available load-balancer using Nginx/HAProxy, you need to set up non-local addresses option for IP failover to work. This page explains how to allow Linux processes to bind to an IP address that doesn’t exist yet. #sysadmin

  12. Tomi Engdahl says:

    htop explained
    Explanation of everything you can see in htop/top on Linux

  13. Tomi Engdahl says:

    As you may know, Linux retired ‘netstat’ and replaced with ‘ss’ command.

  14. Tomi Engdahl says:

    port of OpenBSD’s doas(1) utility to Linux systems.

  15. Tomi Engdahl says:

    eXtern OS – A NodeJS Based Linux Distribution

    eXternOS is a free, new and exciting Linux operating system based on Nodejs, being developed by a computer engineering and computer science student who goes by name Anesu Chiodze.

    It is powered by NW.js which has full support for Node.js APIs and most if not all third-party modules–bringing about limitless possibilities of app development, without looking elsewhere. It brings a new dimension to building native applications with modern web technologies such as HTML5, CSS3, WebGL and more.

    In addition, it ships in with highly tweaked and dedicated software for video and audio playback, and a web browser fully compatible with the latest web technologies.

  16. Tomi Engdahl says:

    Introducing the virt-what and other command for Linux environments that try to detect if it runs on a physical machine or on a virtualized one.

  17. Tomi Engdahl says:

    How to append text to a file when using sudo command on Linux or Unix

  18. Tomi Engdahl says:

    The growth of command line options, 1979-Present

    We can see that the number of command line options has dramatically increased over time

    Ironically, one of the reasons for the rise in the number of command line options is another McIlroy dictum, “Write programs to handle text streams, because that is a universal interface”

  19. Tomi Engdahl says:

    Linux Kernel Teaching

    This is a collection of lectures and labs Linux kernel topics. The lectures focus on theoretical and Linux kernel exploration.

    The labs focus on device drivers topics and they resemble “howto” style documentation.

  20. Tomi Engdahl says:

    Debug bash script:
    bash -x script

    Or in the script itself:
    #!/bin/bash -x

    The debugging output goes to stderr when pass the -x. If you would like to log it to a file (mylog) add two line top of the script:
    exec 2>> /path/to/mylog
    set -x
    # rest of your script goes here


Leave a Comment

Your email address will not be published. Required fields are marked *