{"id":527,"date":"2019-09-14T10:31:06","date_gmt":"2019-09-14T09:31:06","guid":{"rendered":"http:\/\/zerothcode.com\/blog\/?p=527"},"modified":"2019-09-14T12:51:03","modified_gmt":"2019-09-14T11:51:03","slug":"top-10-command-prompts-commands","status":"publish","type":"post","link":"https:\/\/zerothcode.com\/blog\/top-10-command-prompts-commands\/","title":{"rendered":"Top 10 Command Prompts commands"},"content":{"rendered":"\r\n<h2 class=\"wp-block-heading\">Top 10 Command Prompts commands<\/h2>\r\n\r\n\r\n\r\n<p>In this tutorial, I will guide you to\u00a0top 10\u00a0important\u00a0and famous\u00a0command\u00a0prompt\u00a0commands\u00a0with their usage.\u00a0\u00a0<\/p>\r\n\r\n\r\n\r\n<p>1. ipconfig\u00a0:<\/p>\r\n\r\n\r\n\r\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 This is the top most command for seeing the ip address,subnet mask and default gateway also includes display and flush DNS cache, re-register the system name in DNS..\u00a0 This will most useful tool for viewing and troubleshooting TCP\/IP problem.<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>To view ip ,subnet mask address :\u00a0<em>ipconfig<\/em><\/li>\r\n<li>To view all TCP\/IP information, use:\u00a0<em>ipconfig \/all<\/em><\/li>\r\n<li>To view the local DNS cache, use:\u00a0<em>ipconfig \/displaydns<\/em><\/li>\r\n<li>To delete the contents in the local DNS cache, use:\u00a0<em>ipconfig \/flushdns\u00a0<\/em><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p><strong>2.systeminfo<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Have a need to display operating system configuration information for a local or remote machine, including service pack levels? Then system info is the tool to use. When I need to connect to a system that I am not familiar with, this is the first tool I run. The output of this command gives me all the info I need including hostname, OS type, version, product ID, install date, boot time and hardware info (processor and memory). Also knowing what hotfixes are installed can be a big help when troubleshooting problems. This tool can be used to connect to a machine remotely using the following syntax:\u00a0<em>SYSTEMINFO \/S system \/U user<\/em><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"http:\/\/2.bp.blogspot.com\/-RycG1qPt9zs\/U9YXX6Nx3iI\/AAAAAAAAAkk\/cat6hHXi_7I\/s1600\/2.gif\"><img decoding=\"async\" src=\"https:\/\/2.bp.blogspot.com\/-RycG1qPt9zs\/U9YXX6Nx3iI\/AAAAAAAAAkk\/cat6hHXi_7I\/s1600\/2.gif\" alt=\"\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p><strong>3. tasklist and taskkill\u00a0<\/strong><\/p>\r\n\r\n\r\n\r\n<p style=\"text-align: left;\">If you work with Task Manager (ctrl+alt+del) ,you can easily understand this.\u00a0 Task list is list of task which are running on windows currently.\u00a0 If you open any application,it will be added to task.<\/p>\r\n\r\n\r\n\r\n<p><br \/>To List the Tasks type in cmd as :\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0<\/p>\r\n\r\n\r\n\r\n<p>\u00a0\u00a0\u00a0 tasklist<\/p>\r\n\r\n\r\n\r\n<p>This will show the list of task which are running as shown in the picture<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"http:\/\/4.bp.blogspot.com\/-34UiPkUqnGA\/U9YXsDPhViI\/AAAAAAAAAks\/7y0QDQDCl_Y\/s1600\/3.gif\"><img decoding=\"async\" src=\"https:\/\/4.bp.blogspot.com\/-34UiPkUqnGA\/U9YXsDPhViI\/AAAAAAAAAks\/7y0QDQDCl_Y\/s1600\/3.gif\" alt=\"\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>\u00a0To stop the Process or task ,there is two methods :<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Using Image Name:<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>\u00a0\u00a0 We can kill the task using its Image Name as follows:tasklist \/im notepad.exe<\/p>\r\n\r\n\r\n\r\n<p>tasklist \/im notepad.exe<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"http:\/\/2.bp.blogspot.com\/-Zawgi7Mh0h4\/U9YX30LDa6I\/AAAAAAAAAk0\/Jp2hs-1ylBI\/s1600\/4.JPG\"><img decoding=\"async\" src=\"https:\/\/2.bp.blogspot.com\/-Zawgi7Mh0h4\/U9YX30LDa6I\/AAAAAAAAAk0\/Jp2hs-1ylBI\/s1600\/4.JPG\" alt=\"\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>\u00a0<strong><em>Using Process Id:<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>\u00a0 we can stop the process using its process id as follows :<\/p>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p>\u00a0asklist \/pid 1852<\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"http:\/\/2.bp.blogspot.com\/-h9WYK8yptNQ\/U9YX_8TsRNI\/AAAAAAAAAk8\/wS2H_O5oPzU\/s1600\/5.JPG\"><img decoding=\"async\" src=\"https:\/\/2.bp.blogspot.com\/-h9WYK8yptNQ\/U9YX_8TsRNI\/AAAAAAAAAk8\/wS2H_O5oPzU\/s1600\/5.JPG\" alt=\"\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>4. type<br \/>\u00a0type is used to read the text document in command prompt.\u00a0 You can read multiple text in continuously<\/p>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p>type filename.txt<\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"http:\/\/2.bp.blogspot.com\/--_JxlpiktZ4\/U9YYO78geKI\/AAAAAAAAAlE\/CsQIoFTsdJ0\/s1600\/6.JPG\"><img decoding=\"async\" src=\"https:\/\/2.bp.blogspot.com\/--_JxlpiktZ4\/U9YYO78geKI\/AAAAAAAAAlE\/CsQIoFTsdJ0\/s1600\/6.JPG\" alt=\"\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>\u00a0<strong>5.netstat<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Need to know who (or what) is making a connection to your computer? Then netstat is the tool you want to run. The output provides valuable information of all connections and listening ports, including the executable used in the connections. In addition to the above info, you can view Ethernet statistics, and resolve to connect host IP Addresses to a fully qualified domain name. I usually run the netstat command using the\u00a0<em>-a<\/em>(displays all connection info),\u00a0<em>-n<\/em>\u00a0(sorts in numerical form) and\u00a0<em>-b<\/em>\u00a0(displays executable name) switches.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"http:\/\/2.bp.blogspot.com\/-YpC-I3WmAGE\/U9YYbwvUuhI\/AAAAAAAAAlM\/ZbvmRvCHMjY\/s1600\/6.JPG\"><img decoding=\"async\" src=\"https:\/\/2.bp.blogspot.com\/-YpC-I3WmAGE\/U9YYbwvUuhI\/AAAAAAAAAlM\/ZbvmRvCHMjY\/s1600\/6.JPG\" alt=\"\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p><strong>6.net command<\/strong><\/p>\r\n\r\n\r\n\r\n<p><br \/>Although this tool is more known as a command, the net command is really like a power drill with different bits and is used\u00a0to update, fix, or view the network or network settings.<br \/>It is mostly used for viewing (only services that are started), stopping and starting services:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><em>net stop server<\/em><\/li>\r\n<li>net start server<\/li>\r\n<li>net start (display running services)<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>and for connecting (mapping) and disconnecting with shared network drives:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><em>net use m: \\\\myserver\\sharename<\/em><\/li>\r\n<li><em>net use m: \\\\myserver\\sharename \/delete<\/em><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Other commands used with net command are,\u00a0<em>accounts<\/em>\u00a0(manage user accounts), net print (manage print jobs), and net share (manage shares).<\/p>\r\n\r\n\r\n\r\n<p>Below are all the options that can be used with the net command.<\/p>\r\n\r\n\r\n\r\n<p>7 &#8211;\u00a0<strong>nslookup<\/strong>\u00a0&#8211; With the Internet, DNS (Domain Name Service) is the key for allowing us to use friendly names when surfing the web instead of needing to remember IP Addresses. But when there are problems, nslookup can be a valuable tool for testing and troubleshooting DNS servers.<\/p>\r\n\r\n\r\n\r\n<p>Nslookup can be run in two modes: interactive and noninteractive. Noninteractive mode is useful when only a single piece of data needs to be returned. For example, to resolve google.com:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"http:\/\/4.bp.blogspot.com\/-a-tOWnph160\/U9YYvCP2FII\/AAAAAAAAAlU\/i2HkW4HX0Zk\/s1600\/8.gif\"><img decoding=\"async\" src=\"https:\/\/4.bp.blogspot.com\/-a-tOWnph160\/U9YYvCP2FII\/AAAAAAAAAlU\/i2HkW4HX0Zk\/s1600\/8.gif\" alt=\"\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>to use the interactive mode, just type\u00a0<em>nslookup<\/em>\u00a0at the prompt. To see all available options, type\u00a0<em>help<\/em>\u00a0while in interactive mode.<br \/><br \/><br \/>Don&#8217;t let the help results intimidate you. Nslookup is easy to use. Some of the options I use when troubleshooting are: <em>set ds\u00a0(displays detailed debugging information of behind the scenes communication when resolving a<\/em> host or IP Address).<br \/><em>set domain<\/em>\u00a0(sets the default domain to use when resolving, so you don&#8217;t need to type the fully qualified name each time).<br \/><em>set type<\/em>\u00a0(sets the query record type that will be returned, such as A, MX, NS)<br \/><em>server NAME\u00a0<\/em>(allows you to point nslookup to use other DNS servers than what is configured on your computer)<br \/>To exit out of interactive mode, type\u00a0<i>exit.<\/i><br \/><br \/>8 &#8211;\u00a0<em>ping and tracert\u00a0<\/em>&#8211;<\/p>\r\n\r\n\r\n\r\n<p>These tools can be helpful with connectivity to other systems. Ping will test whether a particular host is reachable across an IP network, while tracert (traceroute) is used to determine the route taken by packets across an IP network.<\/p>\r\n\r\n\r\n\r\n<p><br \/>To ping, a system just types at the prompt:\u00a0<em>ping\u00a0<a href=\"http:\/\/www.google.com\/\">www.google.com<\/a>.<\/em>\u00a0By default, ping will send three ICMP request to the host and listen for ICMP \u201cecho response\u201d replies. Ping also includes switches to control the number of echo requests to send (<em>-n<\/em>\u00a0) and to resolve IP addresses to the hostname (<em>-a<\/em>\u00a0).<br \/>To use tracert, type at the prompt:\u00a0<em>tracert\u00a0www.google.com.\u00a0<\/em><\/p>\r\n\r\n\r\n\r\n<p>You can force tracert to not resolve the address to hostnames by using the\u00a0<em>-d<\/em>\u00a0switch, or set the desired timeout (milliseconds) for each reply using\u00a0<em>-w<\/em>\u00a0switch.<\/p>\r\n\r\n\r\n\r\n<p><br \/>9 &#8211;\u00a0<em>result\u00a0&#8211;\u00a0<\/em><\/p>\r\n\r\n\r\n\r\n<p>Used mostly in environments that implement group policies, results (Group Policy Results) verifies all policy settings in effect for a specific user or computer. The command is simple to use, just enter gpresults at the prompt. It can also be used to connect to computers remotely using the\u00a0<em>\/S<\/em>\u00a0and\u00a0<em>\/U<\/em>\u00a0switches.<br \/>10\u00a0&#8211;\u00a0<em>netsh<\/em>\u00a0&#8211; Without a doubt the most powerful command-line tool available in Windows. Netsh is like the swiss army knife for configuring and monitoring Windows computers from the command prompt. Its capabilities include:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Configure interfaces<\/li>\r\n<li>Configure routing protocols<\/li>\r\n<li>Configure filters<\/li>\r\n<li>Configure routes<\/li>\r\n<li>Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service<\/li>\r\n<li>Display the configuration of a currently running router on any computer<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Some examples of what you can do with netsh:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Enable or disable Windows firewall:<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p><em>netsh firewall set opmode disable<\/em><\/p>\r\n<p><em>netsh firewall set opmode disable<\/em><\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Enable or disable ICMP Echo Request (for pinging) in Windows firewall:<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p><em>netsh firewall set icmpsetting 8 enable<\/em><\/p>\r\n<p><em>netsh firewall set icmpsetting 8 disable<\/em><\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Configure your NIC to\u00a0automatically\u00a0obtain an IP address from a DHCP server:<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\r\n<p><em>netsh interface ip set address &#8220;Local Area Connection&#8221; dhcp<\/em><\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<p>(For the above command, if your NIC is named something else, use\u00a0<em>netsh interface ip show config<\/em>\u00a0and replace the name at Local Area Connection).<\/p>\r\n\r\n\r\n\r\n<p>As you can see netsh can do a lot. Instead of re-inventing the wheel, check out the following\u00a0Microsoft\u00a0article for more info on netsh.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Top 10 Command Prompts commands In this tutorial, I will guide you to\u00a0top 10\u00a0important\u00a0and famous\u00a0command\u00a0prompt\u00a0commands\u00a0with their usage.\u00a0\u00a0 1. ipconfig\u00a0: \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n","protected":false},"author":1,"featured_media":547,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[51],"tags":[159],"yst_prominent_words":[120,122,124,118,112,108,130,126,135,114,128,116,99,110,103,106,101,132,136,134],"class_list":["post-527","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-hackers-news"],"_links":{"self":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts\/527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/comments?post=527"}],"version-history":[{"count":0,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts\/527\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/media\/547"}],"wp:attachment":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/media?parent=527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/categories?post=527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/tags?post=527"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}