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

Rebooting:

  • shutdown -r now

Creating Public Keys

  • ssh-keygen -t rsa

Name Server Lookups

  • Get cached names servers:
    host -t ns survv.org

  • Get records from a given name server:
    host survv.org ns1.anilmakhijani.com

Zipping and Unzipping

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

IP Tables

  • Show IP Routing Table: route -n

Posted in

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>