Advertisement

header ads

10 command prompt tricks that you should know


In this blog post I'm going to share 10 command prompt tricks with you. These tricks will become handy in lot of situations. As you know we can do almost anything using terminal in Linux and Unix Operating systems. Terminal is nearly the same as Command prompt in Windows but we usually we don't use command prompt. But we can do lot of cool things using command prompt, lets see some of them in this article.

1. Encryption


encryption is one of the most common ways to ensure that no one other than you can take a peek at your data. and the command prompt on windows give users an easy way to encrypt their files while I can't comment on the quality of encryption that window supports, there is no doubt that any level of encryption is definitely better than no level of encryption. So lets encrypt your sensitive data keep the data away from prying eyes.

There is a simple command that can allow you to encrypt your files on windows. simple launch the command prompt and change your working directory to the folder where your files are. to do this you can use the 'cd' command.As an example, think that you have a file that need to be encrypted on your desktop. That file name is "File" you can simple type the below code to change the current working directory.

C:\Users\RD computer>cd Desktop

C:\Users\RD computer\Desktop>cd File

C:\Users\RD computer\Desktop\File>

Once you done that type Cipher /E and then hit enter. the command prompt will encrypt the file inside that folder. no one from another account will be able to access your encrypted files without decrypting them with your password first. now you can rest easy knowing that your files are safe.

C:\Users\RD computer\Desktop\File>Cipher /E

 Encrypting files in C:\Users\RD computer\Desktop\File\


0 file(s) [or directorie(s)] within 1 directorie(s) were encrypted.

2. Change CMD Color

Lets just admit it, the default color of the command prompt is kind of boring, and don't really inspire a lot of interest in the program so by using this command which I'm about the tell you can change the font color of the command prompt to your liking and make it look better than the normal default black and white look that it comes with.

Lets type help color in the command prompt,

this will give us a list of numbers which we can use to change the colors used in the cmd window. once you've decided the colors you want to use, as an example I'm going with green on a black background, simply type color followed by the code that corresponds to the colors of your choice. so the command for me is color 02, type the command in cmd and hit enter, and see the color on your command prompt window change.



3. Change Prompt Text


Carrying on with customizing the cmd window, I personally would like if the prompt read be something like Dasun@techmagister rather that the default C:Users\RD Computer> prompt. So lets see how we can change that, just type prompt Dasun@Techmagister$G and then hit enter. the below screen shot will how how it changes.


If you wonder what is $G is about simply type help prompt to see a list of special characters that you can include in the prompt. $G stands for the greater than sign as you can see.


4. Change Window Title


On number 4 we have another customization trick, by default the title of the command prompt window reads just that Command prompt. that's boring, lets change it to something cool. on the command prompt window type in title and the text that you want to display on the title bar. It will change the title like this,


5. Watch Star Wars in ASCII text.


You can watch Star Wars in the form of ASCII text on the command prompt. Type the following text on the command prompt and hit enter.

telnet towel.blinkenlights.nl

the ASCII version of star wars will start playing immediately


6. Wifi Hotspot


By using the command prompt you can create a wifi hotspot. so you can share you internet with other devices. to do this type the the following command in the command prompt window.

netsh wlan set hostednetwork mode=allow ssid=HotspotName key=password

this will set up a wifi hosted network in your computer. so to start in on simply type
netsh wlan start hostednetwork

to turn it off type
netsh wlan stop hostednetwork


7. Hide Folders


You can hide any folder or file by right clicking on the folder and choosing Properties and check hidden in Properties. but anyone can look into those folders by choosing show hidden files and folders in folder options. By using command prompt you can hide a folder completely that other than you, no one can look in those folders. here is what you should do,

change the working directory to the folder where you folder to be hidden in in. then type the below code

Attrib +h +s +r FolderName

and to unhide it,

Attrib -h -s -r FolderName


8. Copy CMD outputs to the Clipboard


You can copy texts from the command prompt by using a text command. simply type | clip after the command that you want to copy. It'll don't show any output but instead it will copy the output to the clipboard.



Windows IP Configuration


Ethernet adapter Ethernet:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Local Area Connection* 13:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter VMware Network Adapter VMnet1:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::801e:3212:5df2:e7d4%11
   IPv4 Address. . . . . . . . . . . : 192.168.75.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::c4f1:4477:3a87:a077%19
   IPv4 Address. . . . . . . . . . . : 192.168.174.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . : stdmlb01.sliit.lk
   Link-local IPv6 Address . . . . . : fe80::c44e:5270:14a4:173c%9
   IPv4 Address. . . . . . . . . . . : 172.28.0.238
   Subnet Mask . . . . . . . . . . . : 255.255.224.0
   Default Gateway . . . . . . . . . : 172.28.0.1

Wireless LAN adapter Local Area Connection* 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter Local Area Connection* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.{6138B611-FFF8-484F-BD0D-EE935C17DC22}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.{AD5F8200-0BD4-44C3-9962-5974FB5CEFBD}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.stdmlb01.sliit.lk:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : stdmlb01.sliit.lk


All the output information was copied.

9. Get a List of Installed software


You can get a list of installed software by simply typing the below code in the command prompt window.

wmic product get name 

This command will become handy of you wanted to uninstall one of your installed software using command prompt

you can do that using the following code

wmic product where "Name Of The Product" call uninstall /nointeractive 


10 . Open command window in directory.


You can open up a command prompt in any directory in your computer without using cd to navigate to that directory simply go to the directory where you want any type cmd on the address bar  and a command prompt window will be open up.


So that's all for this post. I hope these information will be helpful to you.


Post a Comment

1 Comments

  1. Copy and paste this codes for the command prompt app:
    @echo off
    echo pause...
    ipconfig
    pause

    ReplyDelete