Linux Basic Commands

Wed, May 6, 2009

Linux

    Starting and Stopping

  1. poweroff will shutdown the system
  2. reboot will restart the system

    Mounting and unmounting

  1. fdisk -l gives a list of all drives
  2. mount /dev/hdd /mnt would mount the hard drive in /mnt
  3. umount /dev/hdd would unmount the hard drive

    Moving, copying, deleting & viewing files

  1. ls will output all the files in the current directory
  2. rm filename will remove the file
  3. rm -r dir will remove the dir
  4. cp filename /home/dirname this will copy the file to /home/dirname
  5. mv filname /home/dirname this will move the file to /home/dirname
  6. cat filetoview this will display the file called filetoview
  7. man -k keyboard this will display man pages containing
  8. tail filetoview this will display the last 10lines of the file called filetoview

    User Administration

  1. adduser accountname this will create a new users called accountname
  2. password accountname this will give accountname a new password
  3. su this will allow you to login as root from your current login

    Misc

  1. ifconfig this will list ip addresses for all devices on the machine
  2. tail -f /var/log/messages this displays the last 10 lines of the system log
  3. /etc/init.d/daemon-name-here start this will start the specified daemon
, , , , ,

This post was written by:

Duffy - who has written 48 posts on Tuts4Tech.

I am the owner of this website, please feel free to ask me any questions you have

Contact the author

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a Reply