lots of tech info here

Important and useful Linux and Unix commands

Here are some useful commands that you may find handy while installing or troubleshooting Linux.

General Commands

How to write a boot image from your hard disk to a floppy

  dd if=boot.img of=/dev/fd0

How to copy the boot image from your hard disk to a floppy

  dd if=/dev/fd0 of=floppy.img

How to search for a file arul.jpg recursively in your Unix account

  find ~/ -name "arul.jpg"

How to display all the processes running on the host

  ps -af

How to check the current quota and tell how much you have used

  quota

How to check disk space in a directory (say /usr)

  du -s -H /usr

How to report size (in kBytes) of all enclosed directories (recursive)

  du -k

How to report size (in kBytes) of all enclosed directories (non-recursive)

  du -ms *

How to list login IDs of users currently logged in to the system

  users

How to change the permanent information kept by the system about your logon ID

  chfn

Administrator commands

change user's shell to /usr/bin/bash (user arul):

  usermod -s /usr/bin/bash arul

access a windows (only FAT or FAT32) partition (say hda2) under linux

  mount -t vfat /dev/hda2 /win

allow root user and other users(where user id=500) to get rw permission for that windows partition

  mount -t vfat -o uid=500 /dev/hda2 /win

list all device files corresponding to hda

  fdisk -l /dev/hda

track down symbolic links, for example, to see where xterm points to

  namei /usr/X11/bin/xterm

print Linux version information

  uname -r

measure hard disk speed

  hdparm -tT /dev/hda

print hardware summary

  more /proc/cpuinfo

check inode usage of all mounted partitions

  df -i

monitoring the system for the growth of a file

  tail -f /var/log/messages

Posted on 01 Jan 2004

If you liked this article, subscribe to our Feed, follow us on Twitter (@aruljohn) and/or join our Facebook Page.

Share this with Others

Subscribe

Tags