Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,529 members, 7,819,906 topics. Date: Tuesday, 07 May 2024 at 06:11 AM

10 Best Command Prompt(cmd) Tricks, Tips & Hacks For Windows - 2015 - Computers - Nairaland

Nairaland Forum / Science/Technology / Computers / 10 Best Command Prompt(cmd) Tricks, Tips & Hacks For Windows - 2015 (6639 Views)

Hiding My PC Folder With Command Prompt (cmd). / How I Created A Wifi Hotspot For My Itel Phone With Command Prompt / Do I Really Need An Antivirus For Windows 8.1? (2) (3) (4)

(1) (Reply) (Go Down)

10 Best Command Prompt(cmd) Tricks, Tips & Hacks For Windows - 2015 by SupremeDimeji(m): 12:30pm On Sep 20, 2015
Some task in Windows is very difficult like get IP address of a system, resolve Domain name to IP address, know active internet connection etc. But in DOS operating system, with the help one command we can do these task. Dos is the first command based Microsoft operating system. We can do many task in an easy way with the help of Dos but we only need to know about these commands. If you do not know about these command then this article is for you. In this article we provide you a list of best CMD tips, trick and hacks.

Best CMD (Command Prompt) Tricks

1. Creating Con Or Non Deletable Folder With CMD
In Windows you can not create a folder with name con or can not rename a folder to con. This is because it is a variable name used by Windows programming. Other variable name includes lp1, lpt2, lpt3 up to lpt9, aux. So Windows can not allow you to make a folder with this name. But with the help of dos command we can create a folder with such name.

1. Press Windows button and run CMD as administrator.

2. Type the command with this syntax "drive name:".
This command allow you to enter in the drive in which you want to create a folder. For example d: and press enter.

3. Now enter the following command
md con\ and press enter.

4. After that your folder is created in specified drive.
[img]http://3.bp..com/-OjpvOPjZIYQ/VXZxy-vBijI/AAAAAAAAAx0/nM7IuvnVSUk/s1600/cnd-con-create.png[/img]

Deleting con Folder
You can not delete such folder manually by using Windows. To delete this folder type the following command in the command prompt.
rd con\

2. Shut Down Computer With Commands
You can also shut down your computer by using command prompt. Type the following command in command prompt.

For Shut Down
shutdown -s

For Restarting
shutdown -r

For Log off
shutdown -l

-s -r -l parameter tells the computer to shut down, restart, log off

3. Shutdown Computer In specified Time With CMD
You can also shut down your computer in specified time using command prompt. If you want to shut down your computer after two minutes type the following command.
shutdown -s -t 120
[img]http://2.bp..com/-B9eMsksA00E/VXZ1ZwlahFI/AAAAAAAAAzY/VahNTLZqHME/s1600/cmd-shutdown-time.png[/img]
[img]http://4.bp..com/-6FaEmRlH60Y/VXZx-sFOoMI/AAAAAAAAAx8/Qj25lLhTCpY/s1600/cmd-shutdown-dialog.png[/img]

4. Print Message Before Shut Down
We can also print some message before shut down a computer. We can use it as a reminder which remind you a task at the time of shut down. We can do this by using the following command.
shutdown -s -t 500 -c "My message. e.g http://supremewap.com"

We can replace my message with our message we want to display.
[img]http://4.bp..com/-HXJY0oTq0rQ/VXZyG4ZkYKI/AAAAAAAAAyE/6jmNkdgot6E/s1600/cmd-shutdown-message.png[/img]

5. Assoc CMD Command
There are many programs installed in our computer. Each program have its own file extension. It is difficult to remember each file extension. If you want to know which file is associated with which program then we can do this by typing the following command
Assoc

This command provide you a list of programs and their associated files.
[img]http://2.bp..com/-QdsiQEOHVOQ/VXZyP5ixVCI/AAAAAAAAAyM/BEFU8XSZkbA/s1600/cmd-assoc.png[/img]

6. Hide A Folder With CMD Command
We can play some interesting tricks with command prompt. Hiding a folder is one of them. By hiding a folder you can also save your data from other users. You can do this by typing the following command.
attrib +s +h D:\ABC

Where ABC is the name of directory we want to hide.
[img]http://2.bp..com/-g5yeX5qP5iA/VXZy9v1DgJI/AAAAAAAAAyU/B2wwzWEdOeo/s1600/cmd-hide-unhide.png[/img]

To Unhide The Folder
We can also unhide the hidden folder using command prompt. To unhide the folder type the following command.
attrib -s -h D:\ABC

7. IP Related CMD Command
ipconfig is of the most useful command to see the IP address, Defult gateway and subnet mask. This command is related to networking and is most important for troubleshooting the problems related to TCP/IP.

To view Subnet Mask and IP Address use
ipconfig

To view TCP/IP related Information use
ipconfig/all

To view DNS cache use
ipconfig/displaydns

To delete the local cache of DNS use
ipconfig/flushdns

8. Net Related Commands
Net is a powerful cmd tool which is used to see the stat of network. This command provide information about active connection. This command is used to view or update network settings.

It is used to view only the services that are started using the following versions of this command

1. net stop server ( when the server is currently not running any service.)

2. net start server (when the server is being starting a service.)

3. net start (This command is used to check the services that are currently running.)

4. For connecting to shared network devices use the following command.

net use m:\sharedservername (for connecting to share network drives)

net use m:\sharedservername/delete (for disconnecting to share network drives)
[img]http://4.bp..com/-baOlpAxfkcs/VXZzNYCwTnI/AAAAAAAAAyk/AqZF_WvDRek/s1600/cmd-net-command.png[/img]

9. Netstat CMD Command
Netstat command is an important tool when you want to know about who is establishing a connection with your computer. The out of this command provide you the information about all active connection and listening ports. we can view Ethernet statics and resolve connecting host IP address to a fully qualified domain name. You can use the Netstat command with following attributes

1. -a (display all connection)

2. -n (sorts connection in numerical order)

3. -b (display executable name. that is browser name)
[img]http://3.bp..com/-e_2bM0JvcRk/VXZzUDOacII/AAAAAAAAAys/JdA2BmQEIpo/s1600/cmd-netstat.png[/img]

10. Nslookup CMD Command
When we use internet , Domain name server resolve the Domain names to IP addresses so we do not need to remember the IP addresses. But in case of troubleshooting we can get the IP address of particular website using this command.

syntax is nslookup supremewap.com
[img]http://3.bp..com/-cj1QN6Zn9eQ/VXZzawIkbgI/AAAAAAAAAy0/meVV3g_V--A/s1600/cmd-nslookup.png[/img]

More hacks and tutorials at http://supremewap.com
Like us on facebook - http://facebook.com/SupremeWap

1 Like 1 Share

Re: 10 Best Command Prompt(cmd) Tricks, Tips & Hacks For Windows - 2015 by Adeyinka12(m): 1:44pm On Sep 20, 2015
Nice
Re: 10 Best Command Prompt(cmd) Tricks, Tips & Hacks For Windows - 2015 by SULBELL(m): 2:39pm On Sep 20, 2015
educative
Re: 10 Best Command Prompt(cmd) Tricks, Tips & Hacks For Windows - 2015 by SupremeDimeji(m): 2:46pm On Sep 20, 2015
Thanks
Re: 10 Best Command Prompt(cmd) Tricks, Tips & Hacks For Windows - 2015 by SUGARSON(m): 6:46am On Sep 10, 2016
VERY EDUCATIVE. THANKS OP.

1 Like

(1) (Reply)

[MORE ITEMS ADDED!!!!] USA USED LAPTOPS ARRIVALS. / MTN Hynet Issues; Please Help / Nigerians In Diaspora To Produce Computers In Local Languages

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 24
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.