Geeks logo

Cmd commands to improve the use of Windows 10 and Windows 11

Cmd Windows Console Commands

By Israel Tena MartiPublished about a year ago 5 min read
Like
Cmd commands to improve the use of Windows 10 and Windows 11
Photo by Gabriel Heinzer on Unsplash

The command console is an important tool for any computer user. It allows you to interact directly with the computer's operating system, giving you access to powerful commands and functions that can help you manage and troubleshoot your computer. With the proper knowledge of Windows cmd commands, you can easily control and customize the way your computer works.

Using the command console is a great way to control your computer's settings and functions, allowing you to customize it to suit your needs. You can use it to automate tasks, manage files, install programs and more. With a few simple Windows cmd commands, you can make sure your computer works exactly the way you want it to.

Check out this video and this article to see the capabilities of this tool:

https://www.youtube.com/watch?v=twuIYy2jME0

https://itmsolucions.es/blog/2020-07-09/comandos-de-cmd-para-mejorar-el-uso-de-windows-10-y-11

Commands to highlight

CMD commands for the CMD

help: display all the commands supported by the CMD with a list detailing all their functions.

exit: close the current CMD window.

cls: clear the entered command lines as well as the responses from the machine.

color: change the color of the console, either the screen background or the letters. It can be used with other commands to extend their functions. For example, color 1F to change the background to blue and the letters to white.

view: check the version of Windows 10 we have installed.

time: view the current time of the computer.

date: display or set a new date.

systeminfo: display information about your computer's hardware, such as the amount of installed RAM, the processor model or the amount of available storage.

logoff: close the current user session completely.

shutdown: shut down the computer completely. Along with other complementary commands, we can configure aspects such as the time or the exact time to shut down the computer. For example, shutdown -r to restart the computer or shutdown -s -t 60 to shut down the computer in 60 seconds.

Basic Windows CMD commands

dir: list the contents of a given directory or folder to display all the files and folders located in the specified path.

cd: access or go back to a certain directory or folder on the system. For example, cd /photos or cd: to go back to the current directory or folder.

md: create a folder with the name given next to the command. For example, md photos or md memories.

type: to create a file with the name and extension indicated next to the command. For example, type accounts.txt or song.rtf. It can also be used to write text to compatible files. For example, robocopy C:foo C:foo C:ar /E or robocopy C:foo C:ar /COPYALL /E /R:0.

copy: copy one or more files to the specified path. For example, copy song /Music or copy song.mp4 /Music.

robocopy: copy one or more files to the specified path. The difference with respect to copy is based on the possibility of copying large files and directory trees, as well as stopping the copy and even canceling it if desired.

move: move one or more files in the specified path. For example, move song /Music or move song.mp4 /Music.

rename: change the name or extension of a file. For example, rename song.mp3 song.mp4 or rename text1 text2.

del: delete the specified file or folder. For example, del cancion or del cancion.mp4.

CMD commands for hard disks and removable drives

diskpart: display and configure the partition properties of a given disk. Once the command has been entered, it has to be used together with other complementary commands. For example, clean C to clean disk C, select disk C to select it or list disk to see a list of all inserted disks.

diskcomp: compare the contents of two disks or storage drives. For example, diskcomp [C: [E:]].

format: format and erase the data on a given drive in a Windows-compatible format. For example, format C or format E:.

convert: convert FAT formatted disks to NTFS formatted disks. For example, convert F or convert E:.

chkdsk: scan a specific storage drive. Together with other supplementary commands, it is capable of performing actions such as formatting a disk or checking disk sectors for later repair. For example, chkdsk /F to fix errors on a drive or chkdsk /R to repair bad sectors and recover information.

defrag: defragment a hard disk to sort information and improve its performance if it is a mechanical hard disk. For example, defrag C or defrag E:.

cleanmgr: analyze and clean up the Windows main drive to free up space similar to the Windows Space Saver tool. For example, cleanmgr C or cleanmgr E:.

CMD commands for networking

ipconfig: display your computer's network information, such as your PC's IP, your router's IP, or the subnet mask.

netstat: display network information regarding TCP/IP connection protocols and connection ports.

getmac: display the MAC address of your computer to know the identity of your computer on the network.

tracert: display the path of your computer when sending a packet to the host address you specify to verify the status and security of the connection. It can be used together with other commands to expand its functions. For example, tracert 11.1.0.1, tracert -h 4 11.1.0.1 or tracert tuexperto.com.

CMD commands for Windows programs

control panel: open the classic Windows control panel.

tasklist: display the complete list of running system processes and applications. In conjunction with other commands, we can close processes and kill them permanently. For example, taskkill /PID 578 to close the process that corresponds to PID 578.

driverquery: display the complete list of drivers installed on the computer to recognize the respective computer components.

msinfo32: display an overview of the hardware, system components and software environment.

Advanced CMD commands for Windows

call [X]: call a batch program from another program.

chcp: display or set the code page number.

chdir [X]: show or change the name of the current directory.

chkntfs [X]: show or change the disk check on system startup.

cmd: Start a new Windows CMD window.

compact [X]: show or change file compression status on NTFS formatted partitions.

doskey: edit, retrieve and create command lines for the Windows CMD.

echo "X": launch messages and text strings in the CMD.

erase [X]: delete one or more files.

fc [X]: compare two or more files and show the differences between them. It is less complete than compare.

find [X]: search a message in one or more files at a time.

findstr [X]: searches for a text string in one or more files at a time.

for: parameter used to execute loops in executable files, which executes a series of lines as many times as indicated as long as the imposed condition is met.

if: parameter used to execute loops in executable files, which executes a series of lines if a certain condition is met.

label [X]: create, delete or change the volume label of a given disk.

mode [X]: configure a system device.

openfiles: show all open files that have been shared with other users.

pause: suspend execution of a batch file.

print [X]: Print a certain text file on the screen.

rd [X]: delete a certain directory.

ren [X]: rename one or more files at a time.

replace [X]: replace files.

rmdir [X]: delete a certain folder or directory.

sc: show system services running in the background.

title [X]: set the title of the CMD window.

tree [X]: display the directory structure of a given drive or path.

type [X]: display the content of one or more text files in TXT, RTF, BAT... format.

verify [X]: check that files are written correctly to a given disk.

vol [X]: display the label of a given volume and the serial number of the chosen disk.

xcopy: copy files and directory trees.

social mediahow togamingfeature
Like

About the Creator

Israel Tena Marti

Computer Scientist, Systems Administrator and Frontend & Backend Developer. My experience as a programmer is quite wide, with more than 22 years programming in different languages.

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.