20 Command Prompt commands worth knowing

The Command is still a powerful Windows tool. Check out his 20 commands for power users worth knowing.

command, prompt, line, commands, Windows

The command line, as the command prompt is called in Greek, is not for everyone. Or at least not for novice users.

Most tasks can now be done through the various other Windows tools (system, control panel, administration tools, etc.) and so the command prompt becomes an obsolete and mostly redundant tool, from an era of text input to DOS.

However, many commands remain useful and most network administrators prefer them.

But beyond the very basic commands, such as dir, more, help etc, that we presented to you here, see 20 basic commands that every advanced Windows user and administrator should know.

Remember that some of the following commands require administrator privileges to work properly. So open a command prompt with administrator privileges and go….

1. Association

Assoc

Most files in Windows are associated with a specific program that is assigned to open the file by default. Sometimes, remembering these associations can be painful.

You can see at any time to which program each file extension is associated by entering the assoc command. A complete list of file name extensions and the corresponding program correlations will be displayed.

You can also change some file association. For example, the assoc .txt= όνομα_προγράμματος will change the file association for text files in any program you enter after the equal sign.

The assoc command will show you both the names of the extensions and the names of the programs, which will help you to use this command correctly.

In Windows 10, you can see a more user-friendly interface that also allows you to change file-type associations on the spot. Go to "Settings (Windows + I)> Applications> Default Applications> Select Default Applications by File Type".

2. Cipher

cipher

Deleting files on a mechanical hard drive does not actually delete the files it contains. Instead, it marks the files as inaccessible anymore and considers the space they occupied as free. The files remain recoverable until the system replaces them with new data, which can take some time.

The cipher command, however, wipes a folder, writing random data to it. Essentially cipher displays or changes the encryption of directories and files on NTFS volumes. If with no parameters, cipher displays the encryption status of the current directory and any files it contains.

But if you want to delete it completely the free space on drive C, for example, you will use the command cipher /w:c:\directory (where directory is a random folder in C), The command will delete the free space on drive C. The command does not replace the unsubscribed data, so you will not delete the files you need by running this command.

If you use the / w parameter, all other parameters are ignored. The specified directory can be found anywhere on a local disk. If it is an attachment point or leads to a directory on another disk, the data on that second disk is deleted.

You can use a number of other encryption commands, however, they are generally redundant with versions of Windows with BitLocker capability.

3. Driverquery

driverquery

Drivers are among the most important software installed on a . Misconfigured, missing, or outdated drivers can cause all kinds of problems, so it's a good idea to have access to a list of what's on your computer.

This is exactly what the driverquery command does. You can additionally give the order driverquery -v to get more information, including the directory in which the driver is installed.

4. File Compare (fc)

file compare fc

You can use this command to detect differences in text between two files. It is especially useful for writers and developers who are trying to find small differences between two versions of a file. Just type fc and then the directory path and file name of the two files you want to compare.

You can also extend the command in different ways. The / b parameter compares only the binary output, / c ignores the case of the text in the comparison and / l compares only ASCII text.

So, for example, you can use the following:
fc /l "C:\iguru\dimitris\1.txt" "C:\iguru\dimitis\2.txt"

The above command compares ASCII text in two txt files.

5. Ipconfig

ipconfig

This command redirects the IP address that your computer is currently using. However, if you are behind a router (like most computers today), you will receive the router's local network address.

However, ipconfig is useful because of its extensions. The ipconfig / release followed by ipconfig / renew may force your Windows computer to request a new IP address, a command quite useful if your computer claims that it is not available.

You can also use it ipconfig / flushdns to refresh your DNS address. These commands are great if the Windows Network Troubleshooter can't respond, which happens occasionally.

6. netstat

command, prompt, line, commands, Windows

The introduction of the command netstat -an will give you a list of currently open ports and related IP addresses. This command will also tell you the status of the port for each connection: listening, established, or close_wait.

This is a great command when you are trying to troubleshoot devices connected to your computer or when you are afraid that a trojan has infected your system and you are trying to detect a malicious connection.

7. Ping

command, prompt, line, commands, Windows

Sometimes, you need to know whether or not packets arrive on a particular networked device. Ping is useful there.

Typing ping followed by an IP address or web domain will send a series of test packets to the specified address. If they arrive and return, you know that the remote device can communicate with your computer.

If it fails, you know there is something blocking communication between your device and your computer. This can help you decide if the root of the problem is an improper configuration or a network hardware failure.

8. PathPing

command, prompt, line, commands, Windows

This is a more advanced version of ping that is useful if there are multiple routers between your computer and the device you are testing.

Like ping, you use this command by typing pathping followed by the IP address, but unlike ping, pathping also relays some information about the path that the test packets follow.

9. Tracert

tracert

The tracert command is similar to pathping. Once again, type tracert followed by the IP address or domain you want to crawl. You will receive information about each step in the path between your computer and the target.

Unlike pathping, however, tracert also tracks how much time (in milliseconds) each transition between servers or devices takes.

10. powercfg

command, prompt, line, commands, Windows

The Powercfg is a very powerful command to manage and monitor how your computer uses power.

You can use the command powercfg hibernate on and powercfg hibernate off to manage hibernation and you can also use the command powercfg / a to view the power saving modes currently available on your computer.

Another useful command is powercfg / devicequery s1_supported , which displays a list of devices on your computer that support connected standby. When enabled, you can use these devices to take your computer out of standby mode, even remotely.

You can enable it by selecting the device in Device Manager, opening its properties, going to the Power Management tab, and then selecting the "Allow computer to be reactivated from this device" box.

The Powercfg / lastwake will show you which device recently woke up your computer from sleep mode. You can use this command to troubleshoot your computer if it accidentally wakes up from its suspension.

You can use the command powercfg / energy to create a detailed power consumption report for your computer. The report is saved in the directory indicated after the completion of the command.

This report will alert you to any system errors that may increase power consumption, such as devices that block certain sleep functions or are not properly configured to meet power management settings.

command, prompt, line, commands, Windows

Windows 8 added powercfg / batteryreport, which provides a detailed analysis of battery usage, if any.

Typically, the report appears in the Windows user directory, and provides details about the time and duration of charge and discharge cycles, the average battery life, and its estimated capacity.

11. Shutdown

command, prompt, line, commands, Windows

Windows 8 has introduced the shutdown command which, as you might have guessed, shuts down your computer.

This is, of course, unnecessary with the already easily accessible shutdown button, but what is not unnecessary is the command shutdown / r / o , which restarts your computer and launches the Advanced Start Options menu, where you can access Safe Mode and Windows Recovery Utilities.

This is useful if you want to restart your computer for troubleshooting purposes.

12. System Info

systeminfo

This command will give you a detailed configuration overview of your computer. The list covers the your system and hardware.

For example, you can look for the initial installation date of Windows, the last boot year, the BIOS version, the total and available memory, the installed hotfixes, the network card configurations, and more.

use it systeminfo / s followed by the name of a computer on your local network to remotely capture information about that system. This may require additional syntax for the domain, username and password, such as:

systeminfo /s [host_name] /u [domain]\[user_name] /p [user_password]

13. System File Checker (sfc)

command, prompt, line, commands, Windows

System File Checker is one automatic scan and repair tool which focuses on Windows system files.

You will need to run the command prompt with administrator privileges and enter the command sfc / scannow. If SFC finds corrupted or missing files, it will automatically replace them using cached copies kept by Windows for that purpose only. The command may take half an hour to execute.

14. task list

tasklist

You can use the tasklist command to provide a current list of all tasks running on your computer. Although it is somewhat redundant with Task Manager, the command can sometimes find hidden tasks with this utility.

There is also a wide range of modifiers. THE tasklist -svc displays services related to each task, use it tasklist -v to get more details about each task and the tasklist -m will locate active DLL files. These commands are useful for complex troubleshooting.

By task list | find [process id] you can get the name of the executable file associated with the specific process ID you are interested in.

15. taskkill

taskkill

The tasks that appear in the tasklist command will have a name and an ID of each process (four-digit or five-digit number).

You can force a program to stop using taskkill -im followed by the name of the executable file or taskkill -pid followed by the process ID.

Again, this is a bit unnecessary with Task Manager, but you can use to "kill programs" which otherwise do not respond or which are hidden.

16. Chkdsk

command, prompt, line, commands, Windows

Windows automatically detects your drive for a chkdsk diagnostic scan when symptoms indicate that a local drive has corrupted sectors, missing clusters, or other logical or physical errors.

If you suspect your hard drive is failing, you can start a scan manually.

The most basic command is chkdsk c: , which will immediately scan the C: drive without having to restart the computer. If you add parameters such as / f, / r, / x or / b, as in chkdsk / f / r / x / bc: , chkdsk will also fix errors, recover data, disassemble the drive, or delete the list of bad sectors, respectively.

These actions require a restart, as they can only be performed with Windows turned off.

If you see chkdsk running at startup, let it do its job.

17. Schtasks

schtasks

Schtasks is your access to the command line in the Task Scheduler, one of the many underrated Windows management tools. While you can use the GUI to manage your scheduled tasks, the command line allows you to copy and paste complex commands to configure many similar tasks without having to click multiple options.

After all, it's a lot easier to use if you remember a few basic parameters.

For example, you can schedule your computer to restart at 23pm every Friday:

schtasks /create /sc weekly /d FRI /tn "auto reboot computer weekly" /st 23:00 /tr "shutdown -r -f -t 10"

To complete the weekly restart, you could also schedule tasks to start specific programs at startup:

schtasks /create /sc onstart /tn "launch Chrome on startup" /tr "C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe"

For different programs, just copy, paste and modify the above command as needed.

18. Format

command, prompt, line, commands, Windows

When you need to format a drive, you can either use the Windows File Explorer graphical interface or go to the command line. You will need administrator privileges to use this command. Make sure you specify the disk or volume you want to format, followed by the desired parameters.

The following command will quickly format the D drive with the exFAT file system, with a 2048 byte assignment size, and rename the volume to "label" (without quotes).

format D: /Q /FS:exFAT /A:2048 /V:label

You can also use this command to remove a volume (/ X) or, if formatted with NTFS, set the file compression to the default setting (/ R). If you are stuck, use the /? to call for help.

19. Prompt

prompt

Would you like to customize your command line to include instructions or specific information? With the prompt command, you can!

Try this:
prompt dose entoli arxige:

You can add the current time, date, drive and path, Windows version number, and more.
prompt $t on $d at $p using $v:

Enter “prompt”To reset the command prompt to the default settings or simply restart the command prompt. Unfortunately, these settings are not permanent.

20. Cls

Filled the command prompt window, trying all of the above commands? There is one last command you need to know to clear it again.

class
That's all.

Conquer the commands of your Windows computer
This article can only give you a taste of what is hidden in the Windows command prompt.

When all the variables are included, there are literally hundreds of commands. The truth is that all these commands require both practice and constant friction to remember. That's why you can train with this free app, which gives specific tasks that you must solve using only the command prompt.

You can also download it Microsoft Command Prompt Reference Guide (in Edge or Internet Explorer) for advanced support and troubleshooting.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.086 registrants.
command, prompt, line, commands, Windows

Written by Dimitris

Dimitris hates on Mondays .....

One Comment

Leave a Reply

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).