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

Comments

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.