{"id":14054,"date":"2026-06-10T02:00:00","date_gmt":"2026-06-10T06:00:00","guid":{"rendered":"https:\/\/www.both.org\/?p=14054"},"modified":"2026-05-20T10:37:55","modified_gmt":"2026-05-20T14:37:55","slug":"a-gentle-introduction-to-freedos-commands","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=14054","title":{"rendered":"A gentle introduction to FreeDOS commands"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"14054\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">1    <\/span>\r\n<\/div><\/div>\n<p class=\"wp-block-paragraph\">If you&#8217;ve tried FreeDOS and have any familiarity with Linux, you might have been confused a bit by the command line. The DOS commands are slightly different from how you might use the Linux command line, so getting around on the command line requires learning a few new commands.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But it doesn&#8217;t have to be an &#8220;all new&#8221; experience for Linux users. We&#8217;ve always included some standard Unix commands in FreeDOS, in addition to the DOS commands that are already similar to Linux. So if you&#8217;re already familiar with the Linux command line, try these commands to help ease into FreeDOS:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"getting-around\">Getting Around<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the <code>CD<\/code> command to change directory in the FreeDOS filesystem. Like all DOS commands, the command name is actually <em>case insensitive<\/em>, so you can use <code>CD<\/code> or <code>cd<\/code> it will work the same; I&#8217;ll use lowercase for these examples. The usage is basically the same on FreeDOS as it is on Linux. To change into a subdirectory called <code>apps<\/code>, type <code>cd apps<\/code>. Or type <code>cd ..<\/code> to go back to the previous directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One key difference when navigating through directories and paths is that on FreeDOS, the directory separator is <code>\\<\/code> (&#8220;backslash&#8221;) instead of <code>\/<\/code> (&#8220;forward slash&#8221;) that you use on Linux. For example, let&#8217;s say you were in the <code>\\devel<\/code> directory and you wanted to move to the <code>\\fdos<\/code> directory. Both of those are at the same &#8220;level&#8221; relative to the root directory. So you could type <code>cd ..\\fdos<\/code> to &#8220;back up&#8221; one directory level (with <code>..<\/code>) and then &#8220;go into&#8221; the <code>fdos<\/code> directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To change to a new directory, you could instead give the full path with the leading backslash. This is handy if you are already deep into another path, and just want to switch immediately to the new location. For example, you can type <code>cd \\temp<\/code> to change to the <code>\\temp<\/code> directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In FreeDOS, like most DOS systems, you can see your current path as part of the DOS prompt. On Linux, your prompt is probably something like <code>$<\/code>. On FreeDOS, the prompt lists the current drive, the current path within that drive, then <code>&gt;<\/code> as the prompt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"listing-and-displaying-files\">Listing and Displaying Files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On Linux, the standard command to list files in the current directory is the <code>ls<\/code> command. On FreeDOS, the command is named <code>dir<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But if you prefer the behavior that you get with <code>ls<\/code>, you can use an alias to use different command line options to the <code>dir<\/code> command to make it look more like the output from <code>ls<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To create an alias to another command, use the built-in <code>alias<\/code> command. For example, use this command to define an alias for <code>ls<\/code> that will display a directory listing in a similar way to using <code>ls<\/code> on Linux:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\&gt;alias ls=dir \/o:ne \/w \/b \/l\nC:\\&gt;ls    \n&#91;apps]         command.com    &#91;devel]        fdauto.000     fdauto.bak\nfdauto.bat     fdconfig.sys   &#91;freedos]      kernel.sys     &#91;util]\nC:\\&gt;ls freedos\n&#91;.]            &#91;..]           &#91;appinfo]      &#91;bin]          boot.bss\nboot.mbr       &#91;cpi]          &#91;doc]          &#91;help]         &#91;nls]\n&#91;packages]     &#91;source]       &#91;temp]         version.fdi<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The command option format is slightly different on FreeDOS than on Linux. On Linux, you start options with a hyphen character (-). But on FreeDOS, options start with a forward slash. The alias command above uses the slash character. In my <code>alias<\/code> example, the <code>\/o:ne<\/code> option tells <code>dir<\/code> to order (o) in a certain way: sort any files and directories by name (n) and then by extension (e). Using <code>\/w<\/code> says to use a &#8220;wide&#8221; directory listing, <code>\/b<\/code> uses a &#8220;bare&#8221; display without the other information that <code>dir<\/code> usually prints, and <code>\/l<\/code> will display files and directories in lowercase.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that the command-line options for the FreeDOS <code>dir<\/code> command are quite different from the options to Linux <code>ls<\/code>, so you can&#8217;t use this <code>ls<\/code> alias exactly like you would on Linux. For example, typing <code>ls -l<\/code> with this alias on FreeDOS will result in a &#8220;File not found&#8221; error, because the underlying FreeDOS <code>dir<\/code> command will be unable to find a file called <code>-l<\/code>. But for basic &#8220;see what files I have on my system,&#8221; this <code>ls<\/code> alias is good enough to help Linux users get started with FreeDOS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly, you can create an alias for the FreeDOS <code>type<\/code> command, to act like the Linux <code>cat<\/code> command. Both programs display the contents of a text file. While type doesn&#8217;t support the command-line options you might use under Linux, the basic usage to display a single file will be the same.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\&gt;alias cat=type<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"other-unix-like-commands\">Other Unix-like Commands<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">FreeDOS includes a selection of other common Unix-like commands, so Linux users will feel more at home. To use these Linux commands on FreeDOS, you may need to install the <strong>Unix Like Tools<\/strong> packages using the FDIMPLES package manager. You can find this package group on the BonusCD if you use the CD images, or as part of the FullUSB image if you used the USB installer.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"533\" height=\"400\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/04\/fdimples.png\" alt=\"A program with a blue background showing a list of programs that can be installed; the &quot;unix like tools&quot; group is selected\" class=\"wp-image-14046\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Not all of the Unix-like utilities work exactly like their Linux counterparts. That&#8217;s why we call them &#8220;Unix-like.&#8221; You might want to check the compatibility if you&#8217;re using some esoteric command-line options, but typical usage should be fine. Start with these common Unix-like commands on FreeDOS:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>cal<\/code> command is the standard Unix calendar program. For example, to display the calendar for the current month, just type <code>cal<\/code>. To view a specific month, give the month and year as arguments:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\&gt;cal 6 1994\n\n      June 1994     \nSu Mo Tu We Th Fr Sa\n          1  2  3  4 \n 5  6  7  8  9 10 11 \n12 13 14 15 16 17 18 \n19 20 21 22 23 24 25 \n26 27 28 29 30       <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">View your disk usage with the <code>du<\/code> command. This is a simple version of the Linux disk usage command and doesn&#8217;t support any command-line options other than a path.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\&gt;du apps\n    158784 C:\\APPS\\FED\n         0 C:\\APPS\nTotal from C:\\APPS is 158784<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>head<\/code> command displays the first few lines of a file. For example, this is a handy way to determine if a file contains the correct data.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\&gt;head fdauto.bat\n@ECHO OFF\nset DOSDIR=C\"\\FDOS\nset LANG=EN\nset TZ=UTC\nset PATH=%dosdir%\\BIN\nif exist %dosdir%\\LINKS\\NUL set PATH=%path%;%dosdir%\\LINKS\nset NLSPATH=%dosdir%\\NLS\nset HELPPATH=%dosdir%\\HELP\nset TEMP=%dosdir%\\TEMP\nset TMP=%TEMP%<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To view an entire file, use the <code>more<\/code> command, which is the default file viewer on FreeDOS. This displays a file one screenful at a time, then prints a prompt to press a key before displaying the next screenful of information. The <code>more<\/code> command is a very simple file viewer; for a more full-featured viewer like you might use on Linux, try the <code>less<\/code> command which has the ability to scroll &#8220;backwards&#8221; through a file, in case you missed something. You can also search for specific text.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have a lot of directories in your program <code>PATH<\/code> variable and aren&#8217;t sure where a certain program is running from, you can use the <code>which<\/code> command. This scans the program path variable, and prints the full location of the program you are looking for.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\&gt;which less\nless    C:\\&gt;FDOS\\BIN\\LESS.EXE<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">FreeDOS includes other Unix-like commands that you might use in other, more specific situations. Try them out and see if they fit your needs.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>bc<\/code> &#8211; Arbitrary precision numeric processing language<\/li>\n\n\n\n<li><code>sed<\/code> &#8211; Stream editor<\/li>\n\n\n\n<li><code>grep<\/code> &#8211; Search a text file using regular expression<\/li>\n\n\n\n<li><code>md5sum<\/code> &#8211; Generate an MD5 signature of a file<\/li>\n\n\n\n<li><code>nro<\/code> &#8211; Simple typesetting using nroff-like macros<\/li>\n\n\n\n<li><code>sleep<\/code> &#8211; Pause the system for a few seconds<\/li>\n\n\n\n<li><code>tee<\/code> &#8211; Save a copy of a command-line stream<\/li>\n\n\n\n<li><code>touch<\/code> &#8211; Modify a file&#8217;s timestamp<\/li>\n\n\n\n<li><code>trch<\/code> &#8211; Translate single characters (like Linux <code>tr<\/code>)<\/li>\n\n\n\n<li><code>uptime<\/code> &#8211; Report how long your FreeDOS system has been running<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"freedos-at-your-command\">FreeDOS at your command<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">FreeDOS is a great way to run classic DOS apps, but you don&#8217;t have to re-learn the commands to use it effectively. If you&#8217;re more familiar with the Linux command line, set up a few aliases and install the Unix-like tools to make your FreeDOS command line feel more familiar.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Adapted from <a href=\"https:\/\/opensource.com\/article\/21\/6\/freedos-linux-users\">FreeDOS commands for Linux fans<\/a> by Jim Hall<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re already familiar with the Linux command line, try these commands to help ease into FreeDOS<\/p>\n","protected":false},"author":33,"featured_media":3841,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[100,340,5],"tags":[104,267,91],"class_list":["post-14054","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-line","category-freedos","category-linux","tag-command-line","tag-freedos","tag-linux"],"modified_by":"Jim Hall","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14054"}],"version-history":[{"count":2,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14054\/revisions"}],"predecessor-version":[{"id":14058,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14054\/revisions\/14058"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/3841"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}