Useful Unix System Administration Commands

I always forget Unix commands to do useful things, so I am just going to list them here:

Update the DB that locate uses:

  • updatedb

Add a default startup script:

  • Gentoo:
    rc-update add "script_name" default
  • Ubuntu:
    update-rc.d "script_name" defaults


  • shutdown -r now

Creating Public Keys

  • ssh-keygen -t rsa

Name Server Lookups

  • Get cached names servers:
    host -t ns
  • Get records from a given name server:

Zipping and Unzipping

  • files.tar.bz2: bzip2 -cd files.tar.bz2 | tar xvf -

IP Tables

  • Show IP Routing Table: route -n

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.