Linux Training : a. Useful commands

Useful commands

This is a small list of commands to learn to start getting functional at the command line in Linux. To say that these are the barest minimum to learn is a remarkable understatement. Work through the exercise at the end of basic everyday commands before continuing through the rest of this page. There is an LIN:exercise at the bottom of this page as well as some on the pages for grep, sed, awk and others.

Page view

Command view

  • Dangerous Commands or procedures

  • basic everyday commands

  • ssh and scp

    ssh is the Secure SHell used to connect to every remote machine. It provides a fully encrypted connection between system that can then be used for command line operation or even for tunneling insecure application through the secure ssh tunnel.
  • grep

    grep is used for finding strings within files or groups of files.
  • sed

    sed is a stream editor.
  • awk

    awk is a filter and output writer.
  • lsof

    lsof will list open files, ports and sockets. A file is open if it is in use by some process.
  • netstat

    Netstat will print connection information. It is often a first tool in play for a network failure.
  • screen

    screen is a window manager for the console.
    Long running process should be run within screen so a lost connection will not stop the process.
  • chkconfig

    chkconfig is the command line tool to setup init scripts for different runlevels.
  • mount

    mount is used to attach a device to the filesystem for use.
  • help

    Online, built-in help is available for (nearly) every command in /sbin, /bin, /usr/bin and /usr/sbin
    • man
      man is short for manual pages.
    • info
      info is a newer method of displaying built-in "HowTo" information.
  • diff and patch

    find changed files and perform merges.

Useful commands exercise

Use scp to get the file useful_commands.tar.gz from /tmp on the host svn

The instruction are in the README file