0% found this document useful (0 votes)
70 views

Dosxlinux

This article compares common DOS/Windows commands to their Linux equivalents. It provides a table listing commands for copying, moving, deleting, and listing files as well as commands for changing directories, making directories, editing configuration files, and more. The table is intended to help those familiar with DOS commands transition to using Linux by showing similar commands.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

Dosxlinux

This article compares common DOS/Windows commands to their Linux equivalents. It provides a table listing commands for copying, moving, deleting, and listing files as well as commands for changing directories, making directories, editing configuration files, and more. The table is intended to help those familiar with DOS commands transition to using Linux by showing similar commands.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Most experienced support techs can drop to a command prompt and execute commands and utilities with

confidence. However, if you're starting to support Linux desktops on your network, you may quickly find yourself
lost when you open a Linux terminal session. Figure A is a list of common D!"#indows commands that you
pro$a$ly use on a daily $asis and their Linux counterparts%
&igure '
What you want to
do
How you did it in
DOS
How you do it in Linux
Copy a file copy path1\filename1
path2\filename2
cp path1/filename1
path2/filename2
Copy subdirectory xcopy path1\. path2 /s cp -R path1 path2
Delete a file del filename rm filename
Move a file move path1\filename1
path2
mv path1/filename1
path2
Rename a file ren filename1 filename2 mv filename1 filename2
List a directory dir ls
Change directory cd \path cd /path
Make directory md path md path
Delete a
subdirectory
deltree \path1 rm -R path
List text file
contents
type filename cat filename
Edit a file edit filename pico filename
Format floppy format a fdformat !fd"#$%%"
Check for disk
errors
chkdsk drive -or-
scandisk drive
fsck /device
Change file
attribute
attrib &- attribute
filename
chmod mode filename
Clear screen cls clear
Display
environment
variables
set env
'et environment
variable
set variable=value env variable=value
'et time time time date MMDDHHSS
Close command
prompt
exit exit
D!"#indows commands vs. Linux commands
#hat do you think of this article format(
ur editors are developing new methods and formats for delivering the solutions you need. Do short articles and
ta$les such as this one $etter help you overcome the )* pro$lems that keep you up at night( !hare your thoughts
with our editors, and you could win a free *ech+epu$lic $ook or ,D of your choice.
Windows DOS commands VS unix commands
Hi all this is a comparison of Ds commands -! unix commands. 's contary to .nix commands Doc commands
are not that much famous. /ut this ta$le will help you to compare the commands and to use them.
DOS Command UNIX or Bash Command Action
D)+ ls 0l 1or use ls 0l&210a all files2
1df 0k !pace remaining on filesystem2
List directory contents
D)+ 3.3 "o0d
D)+ 3.3 "v "os
D)+ "s
D)+ "aa
ls 0tr
ls 0ls
ls 0+
ls 0a
List directory contents $y reverse time of modification"creation.
List files and si4e
List directory"su$0directory contents recursively.
List hidden files.
*+55 ls 0+ List directory recursivly
,D cd ,hange directory
M6D)+
MD
mkdir Make a new directory
'!!)78 ln ,reate a file or directory link
+MD)+
+D
rmdir +emove a directory
,HD)+ pwd Display directory location
D5L
5+'!5
rm 0iv +emove a file
+MD)+ "! 18*2
D5L*+55 1#in 9:...2
rm 0+ +emove all directories and files $elow given directory
,;< cp 0piv ,opy a file
=,;< cp 0+ ,opy all file of directory recursivly
+58'M5 or M-5 mv 0iv +ename"move a file
*<;5 cat Dump contents of a file to users screen
M+5 more ;ipe output a single page at a time
H5L; or ,MM'8D "( man nline manuals
,L!
clear
ctrl0l
,lear screen
5=)*
5=)*>
exit
exit >
5xit a shell
&)8D
&)8D!*+
grep Look for a word in files given in command line
,M; diff
,ompare two files and show differences. 'lso see comm, cmp, mgdiff and
tkdiff.
&, diff
,ompare two files and show differences. 'lso see comm, cmp, mgdiff and
tkdiff.
!5* set and env List all environment varia$les
!5* variable?value
echo @variable@
set
export variable?value
echo Avariable
!et environment varia$les
!how environment varia$les
5,H text echo text 5cho text to screen
!5* variable
setenv 1for , shell2 or export VAR=val 1for
6orn shell. 'lso VAR=val2
!et environment varia$les
;'*H
;'*H @;'*H@B,%CD)+
echo A;'*H
;'*H?A;'*H%"dir
Display search path for executa$les.
!et ;'*H environment varia$le.
;+M;* ApAg export ;!D?'Ch1Cu2C#E ' !et user command prompt.
D'*5 or *)M5 date !how date. 1also set date 0 D! only2
D!65< "h history List command history
D!65< NAME=command alias NAME=command !et command alias
/+5'6 8 trap *rap ctrl0$reak " *rap signals.
!+* sort !ort data alpha$etically"numerically
5DL)8 ed Line mode editor
5D)* filename.txt
pico, gnp, vi, xedit, xemacs,dtpad
5dit a file. *he Linux editor which looks most like D! edit is pro$a$ly ;ico.
18ot a recomendationF2
/',6.; files '%C tar 0cvf "dev"fd> files
mdir, mcopy
doswrite 0a file 1')= only2
!ave files to floppy.
!ee .sing D! floppies
+5!*+5 '%C files
tar 0xvf "dev"fd> files
mdir, mcopy
dosread 0a file 1')= only2
+ead files from floppy.
!ee .sing D! floppies
'**+)/ GHrI0rJ GHaI0aJ GHsI0sJ
GpathCfileJ "s
chmod
,hange file permissions. D!% H%set to 0%remove r%+ead only a%'rchive
s%!ystem "s%recursively
'**+)/ Hh or 0h mv file .file ,hange file to a hidden file 0 rename file with prefix K.K
;+)8* lpr ;rint a file
,'LL
,MM'8D ", 1D!2, ,MD
18*2
source script 1cshrc2
. script 1$ash2
sh script
5xecute script from within $atch shell.
M5M free
top
!how free memory on system
*'!6L)!* 1#)8L6, =;2 ps 0aux
top
List executa$le name, process )D num$er and memory usage of active
processes
M!D lsdev !how system info 1,ommand $orrowed from ')=2
!,'8D)!6
D5&+'7 ,%
fsck
de$ugfs
,heck and repair hard drive file system
,HD)!6 du 0s Disk usage.
&D)!6 fdisk *ool to partition a hard drive.
!./!* -% ,%CdirectoryCpath mount Mount a drive letter to a folder"directory on your hard drive.
&+M'* mkeLfs
!ee% fdformat and mformat for floppies
&ormat drive file system.
-5+
uname 0a
echo A!H5LL
cat "etc"issue
perating system"shell version
pk4ip
tar and 4ip
,ompress and uncompress files"directories. .se tar to create compilation of a
directory $efore compressing. Linux also has compress, g4ip
H!*8'M5 hostname ;rint host name of computer
;)87 ping !end packets to a network host
*+',5+* traceroute !how routes and router hops to given network destination.
);,8&)7 18*2
#)8);,&7 1#in 9:...2
ifconfig Display"configure network interface
8/*!*'* 18et$ios info% 0n,
0c2
8/*!*'* 0a host-name
8/*!*'* 0' IP-address
nslookup host-name
host host-name
;rint D8! info for host.
+.*5 ;+)8* route 0n ;rint routing ta$le.
85* H5L; !*'+* chkconfig 00list Igrep on List services.
85* !*'+*service-name
85* !*;service-name
service service-name start
service service-name stop
!tart"stop service"daemon.
85* !H'+5! df !how mounted shares"filesystems.
85* !58D 18*2
sm$client 0M M-!indo"s-host-name
talk
!end pop0up to a M!"#indows ;,
!end message to another .nix"Linux user. !ee <oLinux tutorial
#)8 startx !tart =0#indows.
+5/* shutdown 0r now +e$oot system.
*o change the 'ndroid0xMN screen resolution on -irtual/ox you need to%
D. 'dd custom screen resolution%
VBoxManage setextradata "VM_NAME_HERE" "CustomVideoMode1" "320x480x1"
L. &igure out what is the OhexP0value for your VideoMode%
L.D. !tart the -M
L.L. )n 7+./ menu enter a
L.Q. )n the next screen append !ga"as# and press Enter
L.R. &ind your resolution and write down"remem$er the 'hex'0value for Mode column
Q. *ranslate the value to decimal notation 1for example 30 hex is 84 in decimal2.
R. 7o to menu$%st and modify it%
R.D. &rom the 7+./ menu select &e'ug Mode
R.L. )nput the following%
($ mount )o remount*r+ ,mnt
$ -d ,mnt,gru'
!i menu$%st
R.Q. 'dd !ga"84 1if your OhexP0value is 302. 8ow it should look like this%
kernel "android0L.Q0+,D"kernel quiet root?"dev"ram> android$ootShardware?eeepc
acpiSsleep?sQS$ios,sQSmode D;)?DN> .-5!'SMD5?QL>xRM> !+,?"android0L.Q0+,D
!D,'+D?"data"sdcard.img vga?MNR
R.R. !ave it%
.+/
T. .nmount and re$oot%
8$ -d ,
0$ umount ,mnt
re'oot )1

You might also like