9 Command Prompt Commands You Should Know!

we’re taking a look at the good old
00:03
command prompt in Windows specifically
00:05
we’ve got nine useful interesting or
00:08
just plain cool commands that are worth
00:10
knowing about and I think you’ll like
00:11
these before we jump in I want to let
00:13
you know about today’s sponsor
00:14
BitDefender and their latest product
00:16
BitDefender total security 20/20 more
00:19
than just an antivirus it’s a complete
00:21
security suite covering all major
00:23
platforms namely Windows Mac iOS and
00:26
Android it’s highly rated by independent
00:29
labs and one product of the year from
00:31
av-comparatives and won best protection
00:33
and best performance from AV tests we
00:36
can go into more details about all the
00:37
features a little later but be sure to
00:39
check out the link in the description
00:41
where you can get a special extended
00:42
four month free trial for new users in
00:45
the US and Canada which will cover up to
00:48
five of your devices and with having
00:50
said that let’s get into those command
00:52
prompt commands alright so hopefully you
00:54
already know how to get to the command
00:55
prompt you can just search CMD + the
00:57
Start menu and you can run it either
00:59
regularly or some commands on here might
01:01
require to run as an administrator the
01:04
first command is a really cool one
01:05
you’ve probably never heard of before
01:07
called safer this allows you to encrypt
01:09
and decrypt files and folders on your
01:11
computer and also securely erase files
01:14
in free space the command can be used on
01:16
a new folder that’s empty by typing
01:19
cipher and then /e to encrypt or slash D
01:23
to decrypt and then the path of the
01:26
thing you want to encrypt so we can
01:28
create a folder just called folder in
01:29
this example now automatically any files
01:32
you put into that folder will be
01:34
encrypted on the fly and you’ll see a
01:36
little padlock on the icon to show that
01:38
it’s encrypted if you want to encrypt a
01:40
directory that already has files in it
01:42
you need to do it like this do you type
01:44
cipher /e / s :
01:48
and then the directory and that will
01:51
encrypt everything inside it currently
01:53
and going forward now the encryption key
01:55
is tied to your user account so it’s not
01:57
like you set a password or anything it
01:59
just automatically loads the key when
02:01
you log on so if you are not logged on
02:03
or the computer or if the computer is
02:06
off then the files will remain encrypted
02:08
and inaccessible after you encrypt a
02:10
folder you’ll get a notification or
02:12
to back up the encryption keys which you
02:15
should definitely do maybe to a thumb
02:17
drive or something because if you ever
02:18
have to copy those files off the
02:20
computer during a recovery when not
02:22
logged in you will need the key file to
02:24
decrypt them later you can also probably
02:25
backup the certificates by searching
02:27
manage security certificates in Start
02:30
menu and then going through that process
02:31
another use of the cipher command is to
02:34
overwrite any free space on a drive
02:36
ensuring that no deleted files can be
02:38
recovered because if you didn’t realize
02:40
when you delete a file even from the
02:42
recycle bin the file isn’t exactly
02:44
erased right away it’s just marked as
02:46
free space and the file can be
02:49
potentially recovered until the sector
02:51
on the hard drive is used to overwrite
02:53
something else so the command we would
02:55
use here is the following its cipher
02:57
slash W :
02:59
and then the drive letter with no spaces
03:02
in the second part it will then just
03:04
overwrite that empty space on the drive
03:05
by basically writing a huge temporary
03:08
file and if you keep refreshing Explorer
03:11
you can see that it keeps getting bigger
03:13
overriding any free space and then it
03:15
just deletes itself when it’s finished
03:17
alright so moving on the next command is
03:19
IP config this is a very useful command
03:22
you might already know about but
03:23
basically displays information about all
03:25
of your network adapters such as the
03:27
local IP address of the adapter and if
03:29
you type in ipconfig /all it shows even
03:33
more detailed info including the MAC
03:35
address aka the physical address of each
03:37
adapter which is a unique identifier and
03:39
useful for identifying unknown devices
03:42
sometimes then another parameter is IP
03:44
config slash flush DNS which purges the
03:48
DNS cache resolver which is basically
03:50
just the saved list of which IP
03:53
addresses correspond to which websites
03:55
sometimes this can be useful if you’re
03:57
having trouble accessing certain
03:58
websites or they’re misbehaving in some
04:01
way or you’ve changed around your
04:03
network settings on your local network
04:04
it can’t hurt and might come in handy if
04:06
you can try it ok on to number 3 we have
04:08
two commands that will just combine into
04:10
one and these are ping and tracer the
04:13
ping command is very simple you just
04:15
type ping and then the domain name or IP
04:18
address and your computer will send out
04:20
a packet asking for a response if there
04:23
is a response you’ll see how long each
04:25
one took
04:26
we’ll also show the IP address
04:28
associated with the domain so if you are
04:30
wondering what IP address a certain
04:31
website has this is a way to find out
04:33
though keep in mind for big websites
04:35
like Google the IP address might change
04:38
because they have different servers
04:39
distributing the load at different times
04:41
and the ping command is also useful if
04:43
you’re having trouble accessing a
04:45
certain website you can try pinging it
04:47
to see if it even responds now the other
04:49
similar command is called tray cert
04:51
which is kind of like ping except it
04:53
shows every single hop your connection
04:55
makes on the way to its final connection
04:57
obviously when you connect to a website
04:59
using the Internet the data isn’t a
05:01
straight shot to the website servers it
05:03
must first go to your ISP which might
05:06
relay it to another place or several
05:08
before finally reaching the website
05:10
running tracer followed by the domain
05:12
will show you each of those intermediate
05:14
connections along with the average
05:16
latency up to that point though this
05:18
will take a bit longer than the ping
05:20
command to finish so this command can be
05:22
potentially useful if you’re diagnosing
05:25
a misbehaving internet connection
05:27
because you can see exactly where there
05:29
are any issues for example if you have
05:31
no internet connection at all
05:32
you can run tracer on some website and
05:35
see if the connection even makes it past
05:37
your router which would suggest a
05:39
problem with your local network not your
05:41
ISP okay next up we have a nifty little
05:43
command called FC which stands for a
05:46
file compare you can run it by typing FC
05:48
then the location of one file and
05:51
another and in this example I’m already
05:53
in the directory with the file so I
05:55
don’t need to put the whole path and
05:56
then like the name suggests it will tell
05:59
you if the files are exactly the same or
06:01
not and if they are text-based files
06:02
what those differences are so in my
06:05
example I have a dot txt and B dot txt
06:08
which are both empty and it says there
06:10
are no differences so if I add some text
06:12
to B dot txt and whatever to a dot txt
06:16
it will now show those as differences
06:18
now this will technically work for any
06:20
kind of file even images and rich text
06:23
files like ms word doc x-files
06:25
but those exact differences won’t be
06:27
recognizable because it’s not just pure
06:30
text so really in most cases it’s just
06:32
good for determining if a file is
06:34
exactly the same as another alright now
06:36
before we continue to the rest of the
06:37
commands which are especially useful let
06:39
me tell you about
06:40
a sponsor like I mentioned before
06:42
BitDefender total security 20/20 has a
06:45
wide array of features such as a network
06:47
threat prevention which can stop attacks
06:49
before they begin by blocking malicious
06:51
attempts on system vulnerabilities and
06:53
brute-force attacks plus there’s
06:55
advanced threat defense which detects
06:57
suspicious processes based on their
06:59
behavior
06:59
it also has multi-layer ransomware
07:01
protection which keeps your important
07:03
files safe even from the most advanced
07:05
ransomware attacks this includes
07:07
ransomware remediation which basically
07:10
instantly backs up any files it detects
07:12
is trying to be encrypted by ransomware
07:14
and restores it after that malware is
07:16
blocked and on top of all that there’s
07:18
even a VPN included for securing your
07:20
internet connection through an encrypted
07:22
tunnel with that you get 200 megabytes
07:24
per day per device of bandwidth but it
07:27
is upgradeable to premium so again be
07:29
sure to check out the link in the
07:30
description for an extended four month
07:32
free trial if you’re a new user based in
07:34
the US or Canada all right so moving on
07:36
these next two commands
07:38
I’ll also combine in one but they’re
07:40
both very important commands they are
07:42
the SFC or a system file checker command
07:45
and the dism command which is short for
07:48
deployment image servicing and
07:50
management’ complicated names aside what
07:52
these tools do is check the integrity of
07:55
Windows core system files and repairs
07:57
them if it finds any errors they’re
07:59
invaluable if you’re ever having
08:01
problems with Windows and suspect
08:03
corrupted system files so to use them
08:05
you’ll probably need to run CMD as
08:07
administrator and the first command
08:09
you’d run is SFC space slash scan now
08:13
which will check for damage system files
08:15
and automatically attempt to repair them
08:18
after it’s done ideally you’ll see a
08:20
message that it did not find any
08:21
integrity violations which just means it
08:24
found no issues if it did find errors it
08:27
may or may not succeed in fixing them
08:29
automatically and just by chance when I
08:31
was recording this it did actually find
08:33
corrupted files and fortunately it says
08:36
it successfully repaired them if it
08:37
fails to repair don’t worry we’re not
08:39
done yet we still have to do the other
08:41
command so let it try and in either case
08:44
whether it found errors and fix them or
08:45
it didn’t find any errors you should
08:47
restart the computer before continuing
08:49
to the next command just in case
08:51
so then after restarting you can do the
08:53
following command
08:54
which is dism slash online slash cleanup
08:58
– image slash restore health and I’ll
09:00
put that in the description by the way
09:02
so you can just copy and paste it this
09:03
command will also check and repair some
09:05
different system files and oftentimes it
09:08
will actually repair files that the SFC
09:10
command needs to repair its files so
09:13
after it finishes hopefully it should
09:15
say there is no corruption detected but
09:17
if it does hopefully it will fix
09:19
anything and then after this process
09:21
completes you should again restart the
09:23
computer and then run sfc /scannow again
09:27
because the dism command may have
09:30
repaired files that will now allow the
09:32
system file checker to repair any files
09:34
it failed to before and hopefully by the
09:37
end of all that everything will be fixed
09:39
ok on to number 6 we have another
09:41
classic and essential command which is
09:44
check disk or chkdsk this one is easily
09:47
one of the most important commands of
09:49
them all and it finds and attempts to
09:51
repair any disk errors the typical way
09:53
to run this command is to type check
09:55
disk and then whatever drive letter you
09:58
want to check probably the C Drive so C
10:00
colon and then slash are the /r
10:03
parameter tells the tool to check for
10:05
both disk errors and bad sectors and try
10:08
to repair them both in most cases it
10:10
will probably tell you that the command
10:12
will require a restart to run especially
10:14
if it’s the system drive because it will
10:17
have to run the program when the drive
10:18
is not in use even if it’s a secondary
10:21
drive though you probably don’t want to
10:22
force dismount it if it’s in use so you
10:25
can just schedule that to restart – so
10:27
just restart the computer and it will do
10:29
its thing on startup and I just ran it
10:31
on a thumb drive though so it doesn’t
10:32
matter and then you can just let it go
10:34
and hopefully it won’t find anything or
10:37
at least fix any issues it does find on
10:39
the thumb drive for example here you can
10:41
see that it found no errors up to number
10:43
seven we have two commands that go
10:45
hand-in-hand which are the task list and
10:47
task kill commands you can probably
10:50
figure out what these do just by the
10:51
names task list will show a list of
10:53
processes running on the computer just
10:55
like what the task manager already does
10:57
and it will also show the process ID of
11:00
each under the PID column though you can
11:02
also have the process ID show and task
11:04
manager by right-clicking to add that
11:07
so nothing here so far is very unique
11:09
and obviously you can also use the task
11:11
manager to kill processes by hitting
11:13
Enter
11:14
but sometimes even that doesn’t work and
11:17
the process just keeps going in that
11:19
case the task kill command may work
11:22
instead what you do is type tasks kill
11:25
then /f + /t and then either /am with
11:31
the name of the process or /p ID with
11:35
the process ID know the /f parameter is
11:37
to forcefully terminate the process and
11:40
the slash T parameter also terminates
11:42
any child processes started by the one
11:44
you’re terminating which is sometimes a
11:46
reason task manager is unable to end one
11:49
just be sure to run CMD is admin but
11:51
task kill should hopefully work if task
11:53
manager fails and if not you might just
11:56
need to do the unthinkable and restart
11:59
the computer okay up to number eight we
12:01
got a couple more so now we come to the
12:03
power CFG command or power config
12:06
specifically we’ll look at the slash
12:08
energy and slash battery report
12:11
parameters for this command which both
12:13
generate potentially interesting reports
12:15
about your computer’s power usage so the
12:17
first one power CFG slash energy when
12:20
you run it will observe the system’s
12:22
power consumption for 60 seconds and
12:24
then generate an HTML report file in its
12:27
current path which it will show and this
12:30
report will let you know about any
12:32
potential errors related to system power
12:34
though in my case it’s mostly just a
12:36
bunch of notices about USB devices not
12:38
going to sleep which I don’t really care
12:40
about it’s probably going to seem like
12:42
information overload so I’ve just
12:44
considered this more of a curiosity
12:45
unless you actually are having power
12:48
issues with your computer the other
12:49
parameter can be used by running power….

LEAVE A REPLY

Please enter your comment!
Please enter your name here