how to run dos mode commands in linux terminal?

Asked by raj simha

in linux how to open the other directory or partitions with linux terminal.how to run dos like mode in linux terminal.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
raj simha
Solved:
Last query:
Last reply:
Revision history for this message
Chris (fabricator4) said :
#1

DOS borrowed a lot from Unix as it was at the time, so there are a lot of similarities. The most common CLI (command line interface) in Linux is bash, and that is what come with Ubuntu. You should do a google search for _basic_ bash primers: there has been an awful lot written on this subject.

To get you started though, to change directories you use the same command as you do for DOS: 'cd'

A few differences in bash though: use the forward slash '/' instead of the back slash '\' as the back slash means something different in bash.

Instead of 'dir' use 'ls' to get a listing of the directory

Bash commands often have a lot more options and are more complicated (and there's a lot more of them) than their DOS counterparts but you will eventually get to appreciate this richness. It will help if you become familiar with the man (text manual) system. For example to find commands to do with manipulating directories you could try

man -k directories

and you will see that 'ls' is the sixth item listed.

to find out what options you can use with ls try the command:

man ls

and you will be in the manual page for the ls command. To quite just press 'q'.

The primers and manual pages will tell you all of what you need to know, but at first it's hard to know which of the most basic commands are most like their DOS counterparts:

dir > ls
          also try 'ls -l' for the long version.
copy > cp
del > rm (remove)
move > mv
mkdir > mkdir (the same)

and so on. If you have USB drives or other drives mounted in your system you should look for them under the /media/ directory, usually listed as their volume name. If the partition does not have a volume name it will be listed under its UUID (long string of numbers).

For internal drives you may have to mount them manually, or add a line to your /etc/fstab file so that they get mounted automatically. This is a slightly more complicated subject that you will understand better once you get to the correct section in a good bash primer.

Chris

Revision history for this message
raj simha (rajsimha4428) said :
#2

i had not red the bash programming article that we run in linux shell .but i understood that it is better than a dos mode.

thanks.