The most important DOS commands - an overview
Related Videos: Learn to Use Basic Command Prompt (DOS) Commands in Windows (May 2024).
With the spread of Windows, the use of the good old DOS commands has almost been forgotten. Calling programs, copying files and making settings - all this was already possible with DOS. In this practical tip we will show you the most important DOS commands.
Command Prompt - Call and Use
However, the use of DOS commands under Windows is still used even in times of colored windows and animated programs. For example, keep this in mind if your Windows has problems and you need to back up your data manually and without a graphical interface. You can start the DOS window (under Windows "Command Prompt") in two different ways:
- Call from the Start menu under All Programs - Accessories (Windows 7) or Start - Windows System - Command Prompt (Windows 10).
- Call via the Windows search, by entering the command "cmd".
Navigation in the file system
Navigation through your file system is controlled under DOS with the command cd . This command stands for "change directory" and can be used in different ways:
- Direct access to a folder, eg with "cd Documents". With this command you switch directly to the "Documents" folder.
- Call of "cd \". This command takes you straight back to the main directory of your hard drive.
- The "cd" command is often used in conjunction with the dir command, which you can use to view the directories on your hard disk. With these two commands, you now have the option of navigating through your entire hard drive. The "dir" command still has the "dir / w" and "dir / p" options to display the contents of your directories page by page. This is recommended for very large directories.
Create, copy and delete folders
After dealing with directory navigation in the previous point, let's look at how to create, copy and delete folders.
- The command md stands for "make directory" and creates a new folder in the current directory where you are. The folder is created with "md [directory name]", for example "md Test".
- The commands del [ file name ] or "erase [file name]" delete a file. The rd [directory name] command deletes an empty directory.
- The copy command to copy files is a bit more complex. Here you have to specify the source and the destination with directory and file name. Example: copy c: \ test \ testfile.txt c: \ testfile.txt. In this example, copy the file "testfile.txt" from the folder c: \ test to the main directory c: \.
Network functions in the DOS window
Now let's take a look at a function that you may use more often in Windows in DOS mode: determining your IP address and network settings.
- By calling the ipconfig command, you can get your current IP address, gateway and subnet. With "ipconfig / all" you will find all detailed information such as the MAC address of your network card.
- The ping command is also often used with ipconfig . This command can check the connection between two PCs in the network and is called up with "ping [computer name]" or "ping [IP address]".
- The arp -a command lists computers or devices with which your device communicated. It is important, for example, if your PC is connected to an unknown router. In this way you get the IP address of the router and can use it to access the Internet.
- The finger [computername] command can be useful if information about users is required. Provided that the firewall does not block fingers.
- With ftp files can be sent back and forth. To do this, enter ftp in the input prompt. Then you can enter further commands, such as "open host". This creates a connection to an FTP server.
Other useful commands briefly introduced
- For batch files or scripts, it makes sense to inform the user of what the script is doing. The echo [message] command is suitable for this.
- Partitions house encrypted files, among other things. You can get information about this using the cipher / C command. Files can also be encrypted / D or decrypted / E. However, it should be noted that this command only works on NTFS partitions.
- If you are currently logged on to a remote computer, you can shut it down remotely: shutdown / s . With the / r option, the computer is restarted and the / l option enables logout from the current session.
To get a complete DOS command overview, enter the command "help" in the DOS window. All important commands are displayed there in a list. You can also obtain detailed information on certain commands by calling "help [command]", eg "help cd" or "help copy". Also known from the good old DOS days are classic games that you can run under DOSBox.
- To get more information about a specific DOS command, type /? one, for example echo /?