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

Posted in

One comment

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>