FRJ's Linux to DOS

Return to Linux Page

Linux has some commands that the DOS user will know.  It also has a number of new commands.  This is not intended to be a total command summary.  Rather it is a getting started type of page.

Linux also provides a package of functions to allow interaction with DOS files.  Additional help can be found by using the Linux 'man mtools' function.  Most DOS commands are supported.

When using a manual you can go up and down through the manual with the up-arrow and down-arrow keys. 

Linux - to - DOS
Linux DOS Comment
startx win This is the command to start X windows.
cd cd Change directory is same in both.
rm del Remove the file.
mkdir mkdir Make a Directory. Same in both. Linux uses to make mount points.
rm -r /tmp deltree /tmp Remove all the files in a directory and any sub-directories and remove the directory and any sub-directories. Use very carefully!
cp copy Copy a file or a directory.
ls dir List files in the directory. A lot more options than with DOS command.
mv rename Move and rename.
mv [filename] /null del [filename] Move file to bit bucket.
cp -r xcopy /s Copy all files and sub directories.
history doskey Recall event with up arrow key. Show history with 'history'.
vi / vim edit Edit a file with a flat ASCII editor. vim is an newer version of vi
more or less type Display the contents of a file.
grep / find -name "filename" find Find a file. Works like DOS 'whereis.com' if you had that installed on your system.
clear cls Clear the screen. Why didn't they make it clr? Good question!

Linux commands
df Shows remaining disk space This also shows you your mounts.
ls -l Shows a directory listing with assigned privileges There are a ton of switches. See 'man ls' for more.
ls -a Shows ALL files in a directory Privileges are rather important in Linux. DOS does not have this feature.
lsmod list modules; shows which modules are loaded. Use this to confirm that ppa and ether card have loaded.
top List all running processes and their process IDs (PID) Allows you to see what your system is doing. Exit with 'q'.
kill Shutdown a process "kill 500" shuts-down PID 500 Watch out which process you kill or you will kill yourself.
q Quit a process or task Often prompted with a ':'. In vi or vim force exit with ':' and then 'q' for quit or 'w' for write and quit to exit.

To see a table of devices do a ls /dev/
/dev/hda Refers to your first IDE hard disk. Second IDE drive is dev/hdb. The second partition on the first IDE drive is /dev/hda2.
/dev/cdrom Refers to your CD-ROM drive. This is always mounted as read only.
/dev/fd0 Refers to your floppy disk
/dev/cua0 Refers to your first serial port. Second is /dev/cua1

Mounts are like changing drives in DOS
mount /dev/cdrom  /mnt/cdrom Mount your CD ROM. Mount point is /mnt/cdrom
mount -t msdos /dev/fd0  /mnt/floppy Mount your floppy using 8.3 file name notation. Mount point is /mnt/floppy
mount -t vfat /dev/hda1  /mnt/win95 Mount your Win95 partition and allow long names. Mount point is /mnt/win95
umount /mnt/cdrom Un-mount your CD ROM
umount /mnt/floppy Un-mount your floppy
umount /mnt/win95 Un-mount the Win95 partition