Helpful DOS Commands

Everyone has computer issues at some point and it’s great when you can click around your menus and open other programs to help figure out the problem. But not all problems can be fixed from the GUI (Graphical User Interface) and you may at some point have to use other more advanced methods to fix your computer problems.

Sometimes when troubleshooting your computer you will need to use command line based utilities to find information or run programs that you can’t do within Windows. In this section we will go over some of the more helpful DOS (Disk Operating System) based commands that you can use to solve your computer problems. There is technically no more true DOS backend to Windows but the command line interface hasn’t changed much since the days where DOS was all you had. Nowadays its just called a command prompt rather than a DOS prompt.

To get to a command prompt go to Start, Run and type cmd and click Ok.

Some of these commands use switches which are different options that will make the command do different things. Switches are usually used by typing a / and then the switch after the command. For example: Command /switch. You can also type Command /? for help on that particular command such as the available switches and how to use them.

  • Chkdsk – Creates and displays a status report for a hard drive based on the file system and also lists and corrects errors on the disk.

    /f : Fixes errors on the disk.
    /r : Locates bad sectors and recovers readable information./blockquote

  • Copy – Copies one or more files from one location to another
  • Del – Deletes specified files.
  • /p : Prompts you for confirmation before deleting the specified file.

  • Dir – Displays a list of a directory’s files and subdirectories.

    /p : Displays one screen of the listing at a time.

  • Exit – Exits the command prompt utility.
  • Gpupdate – Refreshes local and Active Directory-based Group Policy settings, including security settings.
  • Hostname – Displays the host name portion of the full computer name of the computer.
  • Ipconfig – Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings.

/all Displays the full TCP/IP configuration for all adapters.
/renew : Renews DHCP configuration for all adapters.
/release : Sends a DHCPRELEASE message to the DHCP server to release the current DHCP configuration and discard the IP address configuration.

  • Mkdir – Creates a directory or subdirectory.
  • Mmc – Opens Microsoft Management Console (MMC).
  • Move – Moves one or more files from one directory to the specified directory.
  • Nbtstat – Displays NetBIOS over TCP/IP (NetBT) protocol statistics, NetBIOS name tables for both the local computer and remote computers, and the NetBIOS name cache.

-A IPAddress : Displays the NetBIOS name table of a remote computer, specified by the IP address.
-n : Displays the NetBIOS name table of the local computer.
-RR : Releases and then refreshes NetBIOS names for the local computer that is registered with WINS servers.

  • Netstat – Displays active TCP connections.
  • Ping – Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) Echo Request messages.
  • Print – Sends a text file to a printer.
  • Rename – Changes the name of a file or a set of files.
  • Shutdown – Allows you to shut down or restart a local or remote computer. Used without parameters, shutdown will logoff the current user.

-l : Logs off the current user.
-s : Shuts down the local computer.
-r : Reboots after shutdown.
-a : Aborts shutdown.
-f : Forces running applications to close.
-m [ComputerName] : Specifies the computer that you want to shut down.
-t xx : Sets the timer for system shutdown in xx seconds. The default is 20 seconds./blockquote

  • Sfc – Scans and verifies the versions of all protected system files after you restart your computer.

/scannow : Scans all protected system files immediately.
/scanonce : Scans all protected system files once.
/scanboot : Scans all protected system files every time the computer is restarted.
/revert : Returns the scan to its default operation./blockquote

  • Time – Displays or sets the system time.
  • Ver – Displays the Windows XP version number.
  • Xcopy – Copies files and directories, including subdirectories.


© 2024 Online Computer Tips
Website by Anvil Zephyr