40 Windows Commands you NEED to know (in 10 Minutes)
Summary
TLDRThis video swiftly covers the top 40 essential Windows command prompt commands in just 10 minutes. It includes IP configuration, DNS troubleshooting, system diagnostics, task management, and network analysis commands. The tutorial also demonstrates how to optimize battery life, manage file associations, and even troubleshoot potential computer 'hauntings.' Additionally, it features commands to improve your system's health and manage network routes. The presenter highlights the importance of security, showcasing BitDefender's capabilities, and wraps up with a neat trick to reboot directly into BIOS. The video is packed with useful tips for both beginners and advanced users.
Takeaways
- π» Launch Windows Command Prompt by searching 'cmd' in the start menu or using the Windows Key S, and run it as administrator for full functionality.
- π Use 'ipconfig' to view IP address information, and 'ipconfig /all' for more detailed network configuration, including MAC and DNS server addresses.
- π To filter information from 'ipconfig /all', pipe the output to 'find' or 'findstr' with the desired keyword to narrow down the results.
- π Utilize 'ipconfig /release' and 'ipconfig /renew' to change the IP address, with the option to specify an interface to avoid affecting all interfaces.
- πΊ Troubleshoot DNS issues using 'ipconfig /displaydns', and copy the output to the clipboard for easier analysis with the 'clip' command.
- π« Flush DNS cache with 'ipconfig /flushdns' to remove old or stale DNS entries that may cause connectivity issues.
- π¬ For advanced DNS troubleshooting, use 'nslookup' to query DNS records and test different DNS servers for more accurate results.
- π§Ή Clean the command prompt screen with the 'cls' command to declutter the workspace.
- π οΈ Check for power or energy issues with 'powercfg /energy' and get a detailed report on battery status with 'powercfg /batteryreport'.
- π View file type associations with 'assoc' and change them with the 'ftype' command to customize which programs open specific file types.
- π Use 'chkdsk' with the '/f' and '/r' options to check and repair disk errors, potentially fixing performance issues on a 'haunted' computer.
Q & A
How do you launch the Windows command prompt as an administrator?
-You can launch the Windows command prompt as an administrator by either hitting Windows Key S or clicking the start menu icon, searching for 'cmd', right-clicking on 'Command Prompt', and selecting 'Run as administrator'.
What command do you use to find your computer's IP address?
-You use the 'ipconfig' command to find your computer's IP address.
How can you get detailed information about your network configuration, including DNS server and MAC address?
-You can use the 'ipconfig /all' command to get detailed information about your network configuration, including DNS server and MAC address.
How can you filter the output of a command to show only specific information, such as DNS server?
-You can filter the output by using the pipe symbol (|) and 'findstr'. For example, 'ipconfig /all | findstr DNS' will show only the DNS server information.
What command would you use to release and renew your IP address?
-You would use 'ipconfig /release' to release the IP address and 'ipconfig /renew' to renew it.
How do you flush the DNS resolver cache on your computer?
-You use the command 'ipconfig /flushdns' to flush the DNS resolver cache.
Which command can copy the output of a command to the clipboard?
-The command 'clip' can copy the output of another command to the clipboard. For example, 'ipconfig /displaydns | clip' will copy the DNS display output to the clipboard.
What command can be used to check the IP address of a website using DNS servers?
-You can use the 'nslookup' command followed by the website address. For example, 'nslookup networkchuck.com'.
How do you clear the screen in the command prompt?
-You can clear the screen in the command prompt using the 'cls' command.
What command can generate a detailed power configuration report?
-The 'powercfg /energy' command generates a detailed power configuration report.
How can you check the health of your computer's battery?
-You can check the health of your battery using the 'powercfg /batteryreport' command.
What command can be used to check which file types are associated with which programs?
-The 'assoc' command can be used to check file type associations with programs.
Which command checks and repairs disk errors?
-The 'chkdsk' command checks and repairs disk errors. Using 'chkdsk /f' will fix any errors it finds.
How do you use the System File Checker to repair system files?
-You use the 'sfc /scannow' command to check and repair system files.
What is the purpose of the 'dism' command?
-The 'dism' (Deployment Image Servicing and Management) command is used to repair and prepare Windows images, including checking the health of the system image with 'dism /online /cleanup-image /scanhealth' and restoring health with 'dism /online /cleanup-image /restorehealth'.
Which command can list all running tasks and their process IDs?
-The 'tasklist' command lists all running tasks and their process IDs (PIDs).
How do you terminate a specific process by its PID?
-You use the 'taskkill' command with the '/F' and '/PID' options. For example, 'taskkill /F /PID [PID number]'.
What command can generate a detailed wireless network report?
-The 'netsh wlan show wlanreport' command generates a detailed wireless network report.
How can you disable and re-enable the Windows Defender firewall using commands?
-You can disable the Windows Defender firewall using 'netsh advfirewall set allprofiles state off' and re-enable it with 'netsh advfirewall set allprofiles state on'.
What command can you use to continuously ping a server or website?
-You can use 'ping -t [website or IP address]' to continuously ping a server or website.
How can you trace the path to a website, and what is the purpose of the '-d' switch in this context?
-You can use the 'tracert' command to trace the path to a website. The '-d' switch prevents the command from resolving IP addresses to hostnames, making the trace faster.
What does the 'netstat' command do, and what information can it provide?
-The 'netstat' command provides information about network connections, including active connections, listening ports, and associated PIDs. Using 'netstat -ano' provides detailed information with PIDs.
How can you display the routing table of your computer?
-You can display the routing table using the 'route print' command.
How do you add a specific route to the routing table?
-You use the 'route add' command followed by the network destination, subnet mask, and gateway. For example, 'route add 192.168.40.0 mask 255.255.255.0 192.168.1.1'.
What command can you use to restart your computer and boot into the system BIOS?
-You can use 'shutdown /r /fw' to restart your computer and boot into the system BIOS.
Outlines
π Exploring Essential Windows Command Prompt Commands
The script begins by introducing the top 40 Windows command prompt commands, explaining how to launch the command prompt as an administrator. It covers commands like `ipconfig` for viewing IP information, `ipconfig /all` for detailed network information, `ipconfig /release` and `ipconfig /renew` for managing IP addresses, and `ipconfig /displaydns` and `ipconfig /flushdns` for DNS troubleshooting. The segment emphasizes filtering command outputs with `findstr`, copying outputs to the clipboard using `clip`, and using `NSlookup` for DNS queries. It also touches on clearing the screen with `cls`, finding MAC addresses with `getmac`, and checking power and battery status with `powercfg` commands.
π οΈ Advanced Troubleshooting and System Maintenance Commands
This section covers further troubleshooting and maintenance commands. It includes `chkdsk` for checking disk integrity and repairing errors, `sfc /scannow` for scanning and fixing system files, and `dism` for managing and repairing system images. It also discusses handling USB-related issues with `tasklist` and `taskkill`, and introduces the powerful `netsh` command for managing network settings, such as generating a wireless report and showing interfaces. Additionally, it mentions using `ping` for network connectivity checks and `tracert` for tracing the path to a website.
π₯οΈ Managing Network Connections and System Commands
This final section dives into commands for managing network connections and system configurations. It highlights `netstat` for viewing active connections and open ports, and `route print` for displaying the routing table, with options to add and delete routes. The section also introduces the versatile `shutdown` command, which can restart the computer directly into BIOS settings, making it easier to adjust system configurations. The script concludes with a reminder to subscribe and engage with the content.
Mindmap
Keywords
π‘Windows Command Prompt
π‘IP Address
π‘DNS Server
π‘Netsh
π‘Ping
π‘Tracert
π‘Netstat
π‘Tasklist and Taskkill
π‘System File Checker (SFC)
π‘Deployment Image Servicing and Management (DISM)
π‘BitDefender
Highlights
Launch Windows Command Prompt as administrator for full access.
Use 'ipconfig' to find your IP address.
Use 'ipconfig /all' for detailed network information, including MAC address and DNS server.
Filter command outputs with 'findstr' to focus on specific information.
Renew your IP address with 'ipconfig /release' and 'ipconfig /renew'.
Display DNS cache with 'ipconfig /displaydns' and copy to clipboard with '| clip'.
Flush DNS cache using 'ipconfig /flushdns' to remove stale entries.
Troubleshoot DNS issues using 'nslookup' to query different DNS servers.
Clear the command prompt screen with 'cls'.
Find your MAC address using 'getmac /v'.
Generate a power report with 'powercfg /energy' and a battery report with 'powercfg /batteryreport'.
List file associations with 'assoc' and change them if needed.
Check and repair disk errors using 'chkdsk /f' and 'chkdsk /r'.
Use 'sfc /scannow' to check and repair system files.
Deploy and manage system images with 'DISM'.
List and kill tasks with 'tasklist' and 'taskkill'.
Generate detailed wireless reports with 'netsh wlan show wlanreport'.
Ping continuously with 'ping -t' for ongoing connectivity checks.
Trace the route to a server with 'tracert' and speed it up with 'tracert -d'.
Monitor network connections and open ports with 'netstat -a'.
Print and modify routing tables with 'route print' and 'route add'.
Shut down or restart the computer using 'shutdown' command with various switches.
Restart the computer into BIOS using the 'shutdown /r /fw' command.
Transcripts
Here are the top 40 Windows command prompt commands you need to know.
And we're gonna do this in 10 minutes. So first,
let's launch our Windows command prompt.
Either hit Windows Key S or click the start menu icon and search for cmd. Right?
Click that and put that sucker in a beast mode. Run as administrator.
Here's our playground. Let's go. What's your computer's IP address?
Make you find out with IP can fit. Bam. All your IP information right there,
but not everything. Where's your Mac address? Where's your DNS server?
For that we need IP config slash all. This will give us all the goodies.
Now that's way too much information.
We gotta filter it and we can do it with this command.
Save command as before IP config slash All this time we'll do a pipe and type in
find STR R or find string and we'll tell it what we're looking for.
Maybe we wanna see DNS and that's all we wanna see and that's all we get.
Love it. And by the way, you can use fine string on any command. It's awesome.
Maybe your computer needs a new IP address.
We can do that with IP config and we'll first do release to let it go.
And then we'll type in renew reaching out to our DHCP server and getting a fresh
new IP address.
Keeping in mind that will refresh every single interface on your computer.
If you don't wanna do that, then specify the interface just after your command.
Now DNS can be a problem. In fact, it's always dns. It's never in the network.
Remember that. So let's troubleshoot DNS first.
We'll see what your computer knows. IP config for slash display dns.
Basically all the websites it knows about and their IP addresses.
But when you're troubleshooting dns, that's kind of hard to read.
It'd be great if we could just copy that to our clipboard and look at it
somewhere else we can with this command. This command's awesome by the way.
So same command as before, IP config four slash display dns.
But right after that we'll do a pipe and then simply type in clip.
This command will copy the output of that command to your clipboard so you can
fire up your favorite notepad application and paste that sucker right in there.
That's powerful. I love that. I'll never ever forget to flush. And also,
sometimes you might wanna flush your DNS IP config ford slash flush dns.
This will delete your DNS resolver cash on your computer,
removing any old stale DNS entries. Take that dns. It's always your fault. Oh,
and by the way, have you hacked the YouTube algorithm today?
Let's make sure you do hit that like button notification, bell comment,
subscribe. You gotta hack YouTube today ethically, of course.
Now to troubleshoot DNS even further, you may want to use NS lookup.
With NS lookup, we can do things like, Hey, where is network chuck.com?
What's his IP address?
And it'll tell you what DNS server you're using and what answer it gave you.
If you wanna try another DNS server real quick, you can do that.
S look up never chuck.com. And they're right after.
Specify that other DNS server, let's say Google. And we got a second opinion.
You can also check for other types of DNS records from MX to TXT to pointers.
Trust me, you're gonna need those commands cuz it's always dns. It's always dns,
always dns. Now look at your screen, it's messy. Go clean your screen.
Don't be alop. And we can do that with one command. C Ls. Clean your screen.
Is that, what's it stand for? I don't know. It cleans your screen. Do that. Hey,
what's your Mac address? Give it to me right now.
Sorry you were too slow but you wouldn't have been if you used this command.
Get mac slash v bam. There it is right there.
There all your Mac addresses.
This command will see if you have any energy or power issues with your computer
power CFG slash energy. Give it a minute, it'll give you some awesome stuff,
a great report on how you're doing. Also, how's your battery?
What power CFG slash battery report.
It will report to you and what's going on? Just copy that file location,
paste it into your command prompt. Bam, there it is. Battery report.
It'll tell you if your battery sucks. Mine's okay I think. I'm not sure.
This next one is super handy. It's a SS ooc, you thought I was done? Hit enter.
And it's gonna show you which file types are associated with which programs.
So for example, MP four files will open with Windows media player,
but honestly I prefer to use vlc. So with one command,
actually with that same command,
we can specify the file type and have that equal the program you want to use.
Bam. Now, hey, is your computer haunted? Is it going kind of slow? Does it suck?
Don't throw it away just yet. Calm down buddy. Let's check a few things.
Let's make sure it's okay with a command. C H, K, Dsk check disk.
It can check on a few things.
Let's see if you need a repair with the Ford slash f,
it will actually go through your disc and see if there's any errors and fix 'em.
You may wanna try a dash r.
This will actually check for physical sector issues and fix 'em.
Keeping in mind this might need a reboot, a restart and it could take a bit,
especially if your computer is actually haunted. Is it haunted?
Now if that doesn't work and your computers still scaring the crap outta you,
then try this one. S F C, the system file checker.
It'll check your system files including things like Windows,
DL L files and replace them and fix them if they're bad.
So do a forward slash scan now to make magic happen.
Now if your computer's really,
really haunted and you're still having some issues,
you'll need this Command D SM deployment, image servicing and management.
It's a command line tool that will actually fix your system image.
You'll wanna start with a quick checkup,
check the health and maybe go a bit deeper with a longer scan with the option
scan health. And if it does come up with some scary issues,
let's go ahead and restore your health. Man, I wish our health was that easy.
You know it actually is coffee, it doesn't.
So after you've run the DSM commands,
go ahead and go back and do the SFC commands once more.
SFC scan now and you should be good.
And those commands should remove the haunted ness of your computer. .
It shouldn't be scary anymore and it'll prevent you from having to reinstall
Windows.
Now don't you hate it when someone takes a bad USB and plugs it into your
computer and Rick rolls you.
To stop this, we'll need two things. First task list.
We gotta find the task on our system, the process that's doing something.
Task list will list all of our tasks and using the fine string thing we learned
earlier, we'll find what we're looking for. Search for script. There it is.
Now taking that process id,
I can then use Task Kill to kill that task,
Task kill for slash F to force it for slash P I D to specify the P I d and it's
terminated. Now if you thought IP config was cool,
meet his older brother Net sh much like me and my younger brother Cameron,
the older brother,
is much cooler and more powerful and smarter and better in every way.
Like this command right here, W Land Show, W Land Report,
this will give you a super fancy wireless report about your wireless.
So if we open that file by copying that file right there,
pacing it here heading enter a gorgeous report on your wireless situation and
look at that. It even has some commands in here. What the heck? That's cool.
We could honestly spend all day with an sh cuz he's so cool.
By doing things like interface, show interface,
showing you your interfaces.
We can do quick one liners to find our IP addresses. Bam, there they are.
DNS servers. Bam, kind of there they are. Wasn't as easy as I thought.
And even cooler and crazier as you can turn off the Windows Defender firewall
with one command, BAM turned off. But don't worry,
the big brother's always a good guy. He can turn it right back on.
So if you wanna avoid that getting hacked,
then check out the sponsor of this video Bit Defender and their premium security
bit.
Defender keeps your computer safe even when Windows Defender can't like check
this up on this computer running.
But defender notice I can't make any changes to my firewall settings.
It says it's being managed by Bit Defender Firewall.
If I try to run that same command at Shoji,
which is the same command hackers we'll use to disable things,
let's try to turn it off. It tells me, okay, but it didn't do anything.
Bit Defender has your back. They even tell you, hey,
you're safe and we all need someone to tell us we're safe.
And it's not just firewall. If you got online threat prevention,
which will actually block online threats and they're constantly scanning your
system for vulnerabilities and they do some ransomware remediation in case you
do get some ransomware when you fall for that fishing attack, hey it happens.
And they have your back with privacy too from a Safe Pay vpn, password managers,
anti tracker,
they actually block web trackers from tracking you on profiling you. And also,
do you ever wonder if like your webcam is still on or someone's listening to
you? Well you don't have to wonder about that anymore.
Bit Defender will check that constantly and make sure it only turns on when you
want it to turn on. Now I know what you're thinking,
Bit defender's gonna slow my computer down. I want speed, I get that.
And they get that too. So they have different profiles for when you're working,
watching a movie playing game or you're dangerously surfing, public wifi,
whatever the case, they'll adjust your system to help you do what you gotta do.
And if you don't wanna worry about it, they'll switch auto magically for you.
So check the link below, you'll get Bit Defender Premium Security for 64 98.
It's a whole year saving you $95 off the full price.
And you can use it on 10 devices from iOS, Android, Mac, and especially Windows.
You need it on Windows now is Network. chuck.coffee up right now.
Let's find out. Let's ping network. chuck.coffee. Cool,
we're getting a response.
Ping is what we can use to make sure servers and websites are up,
but it only told us four times. What if we wanna sit there and watch it,
just ping it over and over and over again.
We can do that with ping dash t a 10 us ping. It'll never stop.
It'll keep going.
Which is super helpful for when you're just troubleshooting stuff.
If you wanna see if the road to your favorite website is a bit bumpy,
try out Tracer Tracer,
which is Windows dumb version of saying Trace Route.
This will actually trace the path to your favorite website along each router it
takes to get there and tell you if that suckers up or how long it's taking to go
into that guy. Maybe that guy is slow, it'll tell you it can be slow.
So to speed it up just a little bit,
do tracer dash D to not resolve domain names a little bit faster.
Net stat is probably my favorite thing on Windows.
It'll tell you what's connected to you and what you're connecting to.
It'll also tell you what ports you have open, which is kind of important.
Netta dash afaf. Like right now I've got these three popular ports. Open quiz,
what are those four? Comment down below.
And they're open on every single IP address on my system. Every interface.
And I'm listening, I'm waiting for connections.
Netta can also show you the process ID for all your connections.
The dash o switch. So if there is anything dangerous connecting to you,
you can drop that P I d, delete it with Task Hill.
And you can also get some sweet sweet net stats with thatta dash e dash T
five giving you some sent receive statistics every five seconds.
This one is for the Network Geeks route print.
This will show the routes your computer will take to get to certain networks,
what gateways it will use. It's the routing table of your computer. So hey,
here's your default route right here. And with that same command,
we can also add routes to our computer route add,
allowing us to customize the way our computer reaches certain networks.
So here I'm trying to get to the 1 92, 1 68 40 network through this gateway.
If I print the route again, there it is.
And then with route delete it goes away.
That's super handy when you're playing with docker containers on a local VM and
you wanna route to certain networks, it's, it's really cool. And then finally,
my favorite command of all time. I cannot believe I didn't know about this.
Shut down. Just like this. Actually, no, not just like this.
Obviously that command will shut down your computer,
but with a few more switches and by a few I mean a lot.
This will restart our computer and restart it into the system.
Bios without you touching a dang thing. No more spamming at 12, 11 at 10.
No, just this command and it reboots into your bio so you can change your memory
profile so you can enable virtualization. How cool is that?
So thanks for watching.
Thanks for having some coffee with me and I'll catch you guys next time.
And don't forget to subscribe it and do a lot stuff like, like the video.
Browse More Related Video
Network Troubleshooting using PING, TRACERT, IPCONFIG, NSLOOKUP COMMANDS
Setup Share Folders with NTFS Permission in Windows Server 2019
How to use the Command Line | Terminal Basics for Beginners
PoΔetak rada u Cisco Packet Traceru HR
Microsoft Teams Integration with ServiceDesk Plus
How to Install Ubuntu on Windows 10 (WSL)
5.0 / 5 (0 votes)