DOS & LINUX COMMAND COMPARISONS | ||
DOS COMMANDS | LINUX EQUIVALENTS | WHAT IT DOES |
attrib [+-] attribute file-name | chmod mode file-name | change file and directory attributes |
backup | tar -Mcvf device-name directory-name | backup files to a removable device |
cd \directory-name | cd /directory-name | change directory |
cd OR chdir |
pwd | display name of current directory |
chkdsk | df | display free disk space |
cls | clear | clear the screen |
copy file1 file2 | cp file | copy file |
date | date | change system date |
del file-name OR erase file-name |
rm file-name | remove file |
deltree /y | rm -R | remove subdirectories of files |
dir | ls -l | display list of files with details |
dir /w | ls | display list of file names |
dir file-name /s | find . -name file-name | display info about a specific file |
diskcopy | dump | copy disk images |
echo text | echo text | display text to screen |
edit file-name | gedit file-name | screen (visual) text editor |
edlin file-name | ed file-name | basic line editor (non screen-based text editor) |
exit | exit | close a DOS window or a Linux terminal window |
fc file1 file2 | diff file1 file2 | compare contents of files |
fdisk | fdisk | partition hard drive |
find | grep | find character strings in files |
format a: | mke2fs
/dev/fd0 OR fdformat /dev/fd0H1440 ; mkfs -t ext2 -c /dev/fd0H1440 |
format a floppy |
help command-name | man command-name OR info command-name |
display detailed command information |
mem | free | display memory usage |
md directory-name OR mkdir directory-name |
mkdir directory-name | create a directory |
more < file-name | more file-name OR less file-name |
display files page by page |
lpr | print a file | |
pkzip | gzip file-name ; tar file-name.gz | compress files and bundle them into one file |
rd directory-name OR rmdir directory-name |
rm -R directory-name OR rm -rf directory-name |
remove a directory |
rename old-name
new-name OR ren old-name new-name OR move old-name new-name |
mv old-name new-name | rename file |
restore | tar -Mxpvf device-name | restore files from a removable device |
set | env | display current settings of environmental variables |
set variable=value | env variable=value | assign values to environmental variables |
time | date options | change system time |
type | cat | display file contents |
xcopy | cpio | copy entire directory structure |
command-name /? | command-name --help | display summary of command line options |
Please note that the LINUX equivalents are not necessarily 100% identical to their DOS counterparts. Many commands listed above have command line options/flags that are not at all the same between DOS & LINUX.