DOS VS LINUX
DOS Vs Linux
DOS
Command
LINUX Command
Action
DIR
ls -l
List directory contents
TREE
ls R
List directory
recursively
CD
cd
Change directory
MKDIR
mkdir
Make a new directory
RMDIR
rmdir
Remove a directory
CHDIR
pwd
Display directory
location
DEL
rm
Remove a file
DOS Vs Linux
DOS Command
LINUX
Command
Action
RMDIR /S (NT)
DELTREE (Win 95...)
rm -r
Remove all directories and files below given
directory
COPY
cp
Copy a file
XCOPY
cp -r
Copy all file of directory recursively
RENAME or MOVE
mv
Rename/move a file
TYPE
cat
Dump contents of a file to users screen
MORE
more
Pipe output a single page at a time
HELP or COMMAND
/?
man
Online manuals
COMPILED BY BJ
DOS Vs Linux
DOS
Command
LINUX
Command
Action
CLS
clear
Clear screen
EXIT
exit
Exit a shell
FIND
find
Look for a word in files given in command line
FC
diff
Compare two files and show differences. Also see mgdiff
and tkdiff.
SET
set and env
Show environment variables
ECHO text
echo text
Echo text to screen
COMPILED BY BJ
DOS Vs Linux
DOS Command
LINUX Command
Action
BACKUP files A:\
tar -cvf /dev/fd0
files
Save backup files to floppy
RESTORE A:\ files
tar -xvf /dev/fd0
files
Read files from floppy.
See Using DOS floppies
ATTRIB +h or -h
mv file .file
Change file to a hidden file - rename file
with prefix "."
PRINT
lpr
Print a file
MEM
free
top
Show free memory on system
MSD
lsdev
Show system info (Command borrowed
from AIX)
COMPILED BY BJ
DOS Vs Linux
DOS Command
LINUX Command
Action
SCANDISK
DEFRAG C:
fsck
Check and repair hard drive file system
FDISK
fdisk
Tool to partition a hard drive.
mke2fs
See: fdformat for
floppy
Format drive file system.
For floppy drive use see YoLinux Tutorial Using
DOS Floppies with Linux
VER
uname -a
Operating system version
pkzip
tar, gzip and bzip2
Compress and uncompress files/directories.
Use tar to create Linux also has compress, gzip
HOSTNAME
hostname
Print host name of computer
FORMAT
COMPILED BY BJ
DOS Vs Linux
DOS Command
LINUX
Command
Action
PING
ping
Send packets to a network host
TRACERT
traceroute
Show routes and router hops to given
network destination.
IPCONFIG (NT)
WINIPCFG (Win 95...)
ifconfig
Display/configure network interface
NBTSTAT (Netbios info: -n, c)
NBTSTAT -a host-name
NBTSTAT -A IP-address
nslookup hostname
Print DNS info for host.
ROUTE PRINT
route -n
Print routing table.
COMPILED BY BJ
DOS Vs Linux
DOS
Command
SET
variable
LINIUX Command
PATH
echo $PATH
DATE or
TIME
date
SORT
sort
export variable name
Action
Set environment variables
Display search path for
executables
Show date. (also set date DOS only)
Sort data
alphabetically/numerically
EDIT
filename.txt
vim
Edit a file. The Linux editor
which looks most like DOS
edit is probably Pico.
Directory path delimiter
.\
./
Current directory
..\
../
Parent directory
COMPILED BY BJ
DOS Vs Linux
DOS Command
LINUX Command
Action
BACKUP files A:\
tar -cvf /dev/fd0
files
Save backup files to floppy
RESTORE A:\ files
tar -xvf /dev/fd0
files
Read files from floppy.
See Using DOS floppies
ATTRIB +h or -h
mv file .file
Change file to a hidden file - rename
file with prefix "."
PRINT
lpr
Print a file
MEM
free
top
Show free memory on system
MSD
lsdev
Show system info (Command
borrowed from AIX)
COMPILED BY BJ