Wednesday, November 30, 2011

Comparing DOS & Windows to Linux

Despite what some folks will tell you, there is a lot of superficial similarity between DOS and Linux, and also between MS Windows and the X Window System. We can leverage the knowledge we already have to get up and running faster in Linux.
What’s The Same?
  • Hierarchical Directory Structure: DOS, Windows, and Linux all store information in files which are organized into directories (also called folders). Directories may contain files and other directories. Although, the commands differ, files and directories can be created, deleted, renamed, copied, moved and listed from the command prompt.
  • Start a program by typing its name at the command prompt.
  • Windows can be minimized, maximized, closed using buttons or menus.
What’s Different?
Here are some major points you need to know:
  • Linux is Case Sensitive!: To Linux, a capital letter is NOT the same as a lower case letter. The file Junk.txt is NOT the same file as junk.txt. Watch this carefully! It will cause you monstrous headaches!
  • Linux is quiet: If a command succeeds, it will just drop you back at the command prompt without a status message. This can be confusing to new users.
  • Linux does not confirm anything: In DOS or Windows, if you try to delete a file or folder it will ask for confirmation (“Are you sure you want to do that?”). Linux won’t ask, it’ll just do it. This makes it very easy to accidentally destroy a file, or the entire file system. Be SURE of what you type!
  • Slashes: Linux uses a forward slash (/) wherever DOS would use a backslash (\). Linux uses a dash (-) to indicate command switches where DOS would use a slash (/).
  • Search Path: DOS always checks the current directory first, then looks at the PATH environment variable. Linux never looks in the current directory but searches only the directories listed in PATH. To run a program in the current directory you have to type ./ before it.

No comments:

Post a Comment