Breaking

Friday, 18 February 2022

Essential Windows CMD Commands You Should Know | A Beginner's Guide To Windows Command Prompt

Microsoft Windows is a remarkable operating system that has been designed to serve multiple users. But sometimes it might be a little hard to use this marvelous software without any knowledge of the commands that you can use on your computer.



In this post, we will tell you the essential Windows CMD commands that are required to take advantage of the power and capability of your operating system.


Windows command prompt is the easiest way to control your computer and access files. With a little practice, you can do everything from troubleshooting to doing system administration. In this guide, we will teach you how to use these commands and how they can help you



The Command Prompt is your gateway to advanced Windows tools. Here are all the essential CMD commands in a cheat sheet.


What is the Command Prompt?


The Command Prompt is a Windows application that allows you to use the command line without installing scripts or software on your computer. This feature of the operating system enables users to have access and control over their computers even if they are not using them in front of it. Using this, we can execute certain tools from an elevated state.


How to open the Command Prompt?

Windows 8 and 10 Computers: In order for you to start using CMD, first click on "Start Menu" just below the Cortana keypad icon then select the "Command prompt (Admin)" option directly under the Administrative Tools section.


The cmd.exe command-line utility provides a wide variety of powerful features for managing Windows systems and files. While cmd provides a powerful set of tools for handling basic system tasks, it is also used to extend and automate management chores in Windows. You will find many other important commands available for managing your computer that isn't part of the built-in administrator command prompt but require third-party applications like PowerShell or even open-source Linux's own Text Editors such as nano(nano editor) (vim with syntax highlighting).


By using scenarios such as these we can make some advanced use cases that are nothing else but effective than scanning device drivers, deleting files/folders by their respective labels, etc before using them again or similar tasks.


While using this, we need to follow these rules as far as possible:

Every command should be run from the beginning and must be followed by quotation marks(") in order for it to execute successfully on your system. (i tried FTP download but it's only executable without quotes ) always use How-To Geek's series about understanding basic fundamentals of cmd for best learning experience: Using DOS Command Prompt Line (Windows XP+), Basic Dos Commands & PowerShell Another thing which is essential that you carry out upon executing any remote commands are exactly what hostname it will resolve itself.


Take note that not all cmd arguments are interchangeable; some must be specified in a particular sequence. Most of the time, Windows comes ready with alternate command-line prompt styles that you can try out instead. Below is an example of different operating systems having their own default commands and various settings:


Note:- That since Microsoft's introduction to cmd in 2001 they have changed a lot of important parameters which are included in most configuration files created or modified by end-users such as my_config.cmd (Windows 7+), /local/my_config.ini file under users folder in WinXP (documents => My Computer => right-clicking on my computer icon=> properties=> go down to Advanced tab => Advanced Systems Setting=> Configure the operating system)


In order to create your own customized default scripts and configuration files, you need to understand how they are used in different scenarios? Most people want their computers to operate as normal with only minor or negligible changes which are not always possible.


In Windows 10 Creators Update, Microsoft introduced no-touch startup where after pressing Start + d under 'power options' (OS version 1703), it will configure itself by making some adjustments every time that user logs in the hereafter(i tried walking through setup -> do nothing & then come back there). It also can be activated under 'general settings->system->additional startup', with no command line parameters taken into account.


After pressing the power button to put the system in the start-up process, it will first check if there is an active user session and if not shows Boot Mode: SafeUser defined by Windows drive(C:\) & run an alternate command prompt / PowerShell using a configured path as a base directory only (exactly what does this mean?) If you don't know how this works then use Get-Ntuser -Drive C:|fl path that would give you output such as 

Drive 1 System Drive (/dev/sda1 (Active) 209,600 bytes / 937,832 sectors 210 GB Disk Boot InformationACPI BIOS [V01.60] 0903 07/23/2008   ATTRIBUTES:

  ZFlatInit=0     NoDup init =1     NtfsRemovable  Bootable = 0    driverComponentPath="/ITS-MSS" 266448027 57209804 420426704 ........... Dir ID Pathologically Located Data File C:\Users\user_c4d.



Opening Methods of Command Prompt(CMD)


1. Press "Windows Logo Key" at the upper-left of your computer, next click on Start then select Command Prompt (Admin).


2. When this window opens, press "Win+X", and select a level that is acceptable in the list displayed (if not available or desired go further down) - here we would see Windows XP/7 SP3 >Windows 8/10 use then search for command prompt from Quick Search: Enter. Then after selecting it confirm by pressing Enter button until you both find each other as in the image shown in step 2.


3. In the blank white space of the CMD box, type cmd and press Enter to make sure it is not stuck because you need something to be typed wrongly here in order for typing help command works out right>. Click "OK" which will change your windows page into the new one as indicated by '?" above; then double-click on Create New Task using >/p> above the button that contains arrowhead pointing down underneath Command Prompt: Elevated (Run As Administrator). For making this easier just click on File > Save Target instead of following instructions.


4. In an illustrative case a new window will pop up named "Applying entry group policy settings for cmd.exe". Continue Confirming and make changes as needed like for example revoke access of CMD with type in the textbox - No Access which means “Grant: Read” then select button located below menu at the top or by pressing [Ctrl+Shift] + A . Choose appropriate Application domain such as Domain Users (read-only) so that user has no access whatsoever on this particular Task once any problems are being solved herein, your can apply corresponding authorizations at this particular stage of the process.


5. Below is an example tweet by Microsoft deputy director Henry Trojes on how to remove the Start Menu shortcut:


Once you finish and confirm, press the [x] button located in the top-right corner or select Cancel > OK (bottom right window corner)  to dismiss pop up notification again and get a new screen which will show Folder Options>Command Prompt as requested/shown above image which was added accidentally showing newly made changes without approval during installation of Windows 10 upgrade issue error message adds clarity when attempting troubleshooting alongside another two windows shown below to expand and explore as applicable.


6. To undo/justify changes to uninstall CMD from above just select Choose command prompt window here when Windows pops up, that's it - again this should be done especially for those who are only interested in reassigning the Start Menu shortcut back though may not necessarily overlook the recommendation on how he knew about his newly added shortcuts having CMD which was supposed to have been left on root of PC content: http://www.cnet4u.com/how-to....ountry-drive Today we attempt fixing the same issue with Homegroup being disabled by reinstalling wireless networking drivers via driver verifier (recommended).

2 methods using Driver Verifier


1.Click Start > Control Panel

2.Click System and Security

3.On the left, click on Action Center

4.Select 'Troubleshoot' button

5.Open Advanced options .


Windows 7 Computers: In order for you to start using CMD, first click on "Start Menu" then right-click 'My Computer, and then select the option of 'Properties' in the pop up window that appears. Then under the System tab, a new section will appear named as Advanced Settings.


There is automatically an entry pointing at Start->Run box is created here by default unless it was changed previously from settings or other sources like Group Policy Editor. Here write cmd after command prompt and press Enter button without Dual/Caps Lock keys pressed down for 3 seconds (around 5 seconds). Click the OK button and a new Command Prompt window will appear on the computer.


Essential CMD commands:


To summarise, the commands listed below can be used to help with various tasks in Windows.


Commands Use

ASSOC Displays or modifies file extension associations.

ATTRIB     Displays or changes file attributes.

BREAK      Sets or clears extended CTRL+C checking.

BCDEDIT      Sets properties in boot database to control boot loading.

CACLS     Displays or modifies access control lists (ACLs) of files.

CALL    Calls one batch program from another.

CD        Displays the name of or changes the current directory.

CHCP      Displays or sets the active code page number.

CHDIR      Displays the name of or changes the current directory.

CHKDSK      Checks a disk and displays a status report.

CHKNTFS     Displays or modifies the checking of disk at boot time.

CLS    Clears the screen.

CMD     Starts a new instance of the Windows command interpreter.

COLOR       Sets the default console foreground and background colors.

COMP        Compares the contents of two files or sets of files.

COMPACT    Displays or alters the compression of files on NTFS partitions.

CONVERT    Converts FAT volumes to NTFS. You cannot convertthe current

    drive.

COPY       Copies one or more files to another location.

DATE         Displays or sets the date.

DEL        Deletes one or more files.

DIR       Displays a list of files and subdirectories in a directory.

DISKPART      Displays or configures Disk Partition properties.

DOSKEY      Edits command lines, recalls Windows commands, and creates

macros.

DRIVERQUERY   Displays current device driver status and properties.

ECHO       Displays messages, or turns command echoing on or off.

ENDLOCAL     Ends localization of environment changes in a batch file.

ERASE      Deletes one or more files.

EXIT        Quits the CMD.EXE program (command interpreter).

FC        Compares two files or sets of files, and displays the differences

                                                    between them.

FIND       Searches for a text string in a file or files.

FINDSTR     Searches for strings in files.

FOR       Runs a specified command for each file in a set of files.

FORMAT       Formats a disk for use with Windows.

FSUTIL     Displays or configures the file system properties.

FTYPE       Displays or modifies file types used in file extension associations.

GOTO        Directs the Windows command interpreter to a labeled line in a

                                                    batch program.

GPRESULT    Displays Group Policy information for machine or user.

GRAFTABL     Enables Windows to display an extended character set in graphics

                                                    mode.

HELP      Provides Help information for Windows commands.

ICACLS       Display, modify, backup, or restore ACLs for files and directories.

IF                                     Performs conditional processing in batch programs.

LABEL    Creates, changes, or deletes the volume label of a disk.

MD        Creates a directory.

MKDIR      Creates a directory.

MKLINK       Creates Symbolic Links and Hard Links.

MODE        Configures a system device.

MORE    Displays output one screen at a time.

MOVE        Moves one or more files from one directory to another directory.

OPENFILES     Displays files opened by remote users for a file share.

PATH        Displays or sets a search path for executable files.

PAUSE       Suspends processing of a batch file and displays a message.

POPD        Restores the previous value of the current directory saved by

                                                PUSHD.

PRINT       Prints a text file.

PROMPT    Changes the Windows command prompt.

PUSHD       Saves the current directory then changes it.

RD                           Removes a directory.

RECOVER   Recovers readable information from a bad or defective disk.

REM                      Records comments (remarks) in batch files or CONFIG.SYS.

REN     Renames a file or files.

RENAME    Renames a file or files.

REPLACE   Replaces files.

RMDIR     Removes a directory.

ROBOCOPY    Advanced utility to copy files and directory trees

SET    Displays, sets, or removes Windows environment variables.

SETLOCAL      Begins localization of environment changes in a batch file.

SC      Displays or configures services (background processes).

SCHTASKS      Schedules commands and programs to run on a computer.

SHIFT     Shifts the position of replaceable parameters in batch files.

SHUTDOWN   Allows proper local or remote shutdown of the machine.

SORT        Sorts input.

START       Starts a separate window to run a specified program or command.

SUBST       Associates a path with a drive letter.

SYSTEMINFO    Displays machine-specific properties and configuration.

TASKLIST      Displays all currently running tasks including services.

TASKKILL      Kill or stop a running process or application.

TIME       Displays or sets the system time.

TITLE       Sets the window title for a CMD.EXE session.

TREE        Graphically displays the directory structure of a drive or path.

TYPE        Displays the contents of a text file.

VER        Displays the Windows version.

VERIFY     Tells Windows whether to verify that your files are writtencorrectly

                                                to a disk.

VOL        Displays a disk volume label and serial number.

XCOPY      Copies files and directory trees.

WMIC       Displays WMI information inside the interactive command shell.


For more information on a specific command, type HELP command-name.


Learning about the various options and syntax for these commands can help you to effectively administer your computer system.


Windows CMD is a command-line shell, which can be used to administer your computer system. If you are a newbie, you may have some difficulties in understanding the command syntax and options. However, there are many resources available on the internet that can help you to learn the basic Windows CMD commands and their syntax.


Learning about the various options and syntax for these commands can help you to effectively administer your computer system.

C:\>cd C:\Windows or cd DriveLetter:. (change directory)  De-selecting all options and syntax, here is the simplest example :

1. Type "dir" to display a list of files in your current directory only

Directory Listing For Tp500_Usr------------Tp500 Usr====================(c) =========== filename & path -----------------------------------------------------------D\Public documentsFBINJ FbincMntKONnfx6db76df8e-wzmv~FChome document Help Desk Manager.pdf (32,8MB)NFO NFOKONnfx6db76df8e-wzmv~FGuidb folder Help Desk Procedures.doc...


2. Type "cd c"  to change the directory to the document "FBINJ". Changing Directory Without Options https://support.microsoft .com/en-us/kb/1513445 F:\>cd Documents Using the absolute path and no folders, any file in F: is a valid destination. The immediate difference between these two examples is that C allows you to run an executable directly from within Windows Explorer plus it enables context menus for files - if you right-click on a file in Explorer or press ALT + Enter and type properties, as depicted here...


3. Type "dir /B" to view details of all files/directories except system directories (e.g., C:\Windows) Performing Dir listing with Options https://support .microsoft.com/en-us/kb /1513035  and yes, working with the command without quotes will yield all of the files listed; so you can see how "dir" works.


4. Type "cd c:\windows' to change the directory back (No further options are required) F:\>cd C: Now, let's check out a file in another drive - like DriveA or any volume on your computer system...


You Can Apply all of these Commands by Yourself.


The HELP command is used to display detailed information on individual commands or keywords within those commands, should you need it during usage or troubleshooting procedures.


All in all, your commands would look like this;

Sysinternals Fcntl.exe Command - Get File (Through Script) FROM C:\Windows\System32\File from the command prompt and run it in your system path or @system32 directory... Then, voila! You can see all powers as well.. :) Despite being very good at using cmdlets the POWERFUL​ really help you Minimize tasks by automating workflows. A Blog Post Like  Apart From Content Instead of Learning PowerShell Commands is a must-read for anyone considering learning PowerShell to save.

No comments:

Post a Comment