Tuesday, November 2, 2010

Some useful Commands for linux

Some useful  Commands for linux

Commands

  • ls : show a directory listing
  • df -h : show how much disk space is left
  • du -csh myfolder : show how much space is in use by the folder myfolder
  • cd : change directory
  • cp -r : copy a file
  • rm -r : delete a file
  • mkdir : make a directory
  • chmod : change the file permissions
  • pwd : show current working directory
  • whoami : show your user name
  • hostname : show your host's name
  • uptime : show the uptime of your host
  • top : show the top CPU consuming processes

Hard drives


  • hwinfo --storage-ctrl :discover your hard disk controller
  • hwinfo --block :discover what disks you have
  • hwinfo --partition :discover what partitions you have
  • fdisk :divide your disk devices into partitions     (USE WITH CAUTION!!)

NetWorking


  • hwinfo --netcard :find out your NIC's type and abilities
  • ethtool :find out if a cable has been plugged in (link detection)
  • ping :find out if a computer is reachable
  • ifconfig :set your IP-address
  • route :set your default gateway
  • nmap :find out about ports information on a computer

No comments:

Post a Comment