Nadav and the wonders of the web


A few useful Linux commands for the newbie

Here is a list of a few useful Linux commands for us newbies. =]

This are most of the commands that i have come to use in Linux, this are the ones that I think it’s worth to at least know. You never know when it will come in handy…

  1. ls - Works the same as “dir” in DOS, lists all the files and folders at the current path.
  2. cat filename - Pasts the contents of filename to the screen.
  3. man command - Loads the manual file for the command\program.
  4. wget url - I think this actually a program but it will most likely be available on every Linux system you will use. It fetches the file\page at the url.
  5. mkdir name - Create a directory named name.
  6. rm filename - Delete filename.
  7. rmdir foldername -Delete foldername.
  8. ps - Lists processes.
  9. passwd - Change the password of the current user.
  10. chmod - Read about this one, this is used to change the rights regarding read/write/execution of a file or folder.
  11. chown - Used to change the owner of a file or folder.
  12. cp filename1 filename2 - Used to copy files from filename1 to filename2.
  13. df - Used to review hard-drive space, personally, I use it with “-hT”.
  14. fdisk /dev/*** - Used to partition a hard-drive, usually the drives location will be /dev/hda or /dev/sda or /dev/hdb and so on…
  15. find key - Find files on the file system. I am not very familiar with it but I know that sometimes you would prefer to use locate.
  16. grep regularExpression- used to find lines that correspond with the regularExpression usually used in parallel to another command like ps. [ps | grep cups]
  17. ifconfig -Lists the available network adapters and their status.
  18. kill - Stop a process by PID[Program ID].
  19. killall - Stop a process by name.
  20. lsmod - Lists currently loaded modules[this is a subject of it's own].
  21. rmmod mode - Unload a module from the kernel.
  22. lsusb - Lists all USB devices.
  23. mount - Used to mount a device/partition to a certain path.
  24. umount - Used to un-mount a device/partition.
  25. dig serverAddress -Used to query the DNS server.
  26. sftp - ftp, but secure!.
  27. ssh address - Connect to a SSH server at address.
  28. su username - Start using the shell as username.
  29. sudo command - Run command as if you were root. This command is currently used in many different distros to re-authenticate the user in order to make sure this is not some kind of a harmful program.
  30. tar - Create or restore file from a tarball.
  31. traceroute address - Shows the entire route it takes a request in order to get to address. Useful when trying to find bottle necks in networks.

For more info on any of this commands either use “man” or call the command and “–help” or “-h” after the command(or click the link…). It should list the different possibilities of usage to that command.

Hope this helps you with your Linux endeavours. BTW - most or at-least some of the commands should work on UNIX based systems as well. This is due to the fact that both Linux and UNIX adhere to POSIX.

Until next time, have a good one! =]

Nadav

Tags: , ,

3 Responses to “A few useful Linux commands for the newbie”

  1. Ran Says:

    They should develop a function called Kill for windows too.
    And this could be useful in the future, when I decide to play a little with Linux and see what it is all about.

  2. nadav Says:

    Try using taskkill in the cmd(command line).
    Run taskkill /? for details.

  3. Ran Says:

    I had a feeling that there is something like that in windows too.

Leave a Reply

Jajah is the VoIP player that brought you web-activated telephony.