Very Basic Windows Command Lines Everyone Should Know:- Think you are a true windows lover? I would ask you to think twice if you are completely oblivious to the world of commands. In order to call yourself a real windows lover, you should have the minimum knowledge about the basic commands widely used. Read on, to learn all about the basic windows command lines without which you will always be incomplete.
View Contents Of a Drive
- First of all, open the drive or folder that you want to view the contents of, using file explorer. This is just to get a clear picture. I have chosen to view the sub folders in the drive D.
- Now, open Command Prompt. You can open it by searching for cmd in the windows search box. Or you can press Win+R keys together to open the Run dialog box and type in cmd to open it. Once it opens up, navigate to the drive that you have selected by typing in the drive’s letter followed by a colon. In the example given below, I have navigated to drive D:. Hit enter key once you are done. Now inorder to view the files and folders in this drive, type in the command DIR and hit enter key. Refer to the following screenshot if you have any doubts.
- To change the current directory, you can use the command cd directory_name. Replace directory_name with the name of the directory that you want to change to. You can again use the DIR command to view the sub folders and files.
- To go back one level up the current directory or to move to the previous directory, type in cd.. and hit enter key.
- You can navigate to the sub folder of a folder in a single step as well. For that, type cd folderName subFolderName.
Create New Folder
- You can create new folders within a folder by using the command mkdir. You can create multiple folders using a single mkdir. In the given screenshot I have created two new folders using the mkdir command.
- To check whether new folders have been created in the previous step, you can either use DIR command or you can use the file explorer to view the drive.
Create an Empty File
- To create an empty file, you can use the command touch. The touch command is followed by the name of the file. You can use touch command to create multiple files in a single step as well.
- To see whether touch command has successfully created new files, you can either use DIR command or file explorer itself.
View IP Configuration
- To view the IP configuration of your system, open Command Prompt in administrator mode. You can do so by searching for Command Prompt in the windows search. When Command Prompt appears in the search results, right click on the result and choose run as administrator option.
- If you want to exit from the Command Prompt, simply type in exit to the Command Prompt and hit enter.
So these are some of the very basic command lines that every windows user should be familiar with. Hope you found the article useful. Stay tuned for more tricks, tips and hacks.