Top the best command-line tools in windows năm 2024

Getting familiar with the windows command line is one of the wisest Tech decision you will ever take. It helps you more smarter.

In this article, i will be showing you about Top 18 Windows Command line tools you need to know 1.Hostname: Helps to display the PC Name

2.Time: Helps to display Current PC Time

3.Date: Helps to display Current PC Date

4. Ver: Helps to display your current Operating System Version

Top the best command-line tools in windows năm 2024

5.Cls: Helps to clear your command prompt screen

6.Start: Helps to open another command prompt windows

7.Explorer: Helps to open Windows explorer

8.Stutdown: Helps to shutdown or restart your computer (E.g [Shutdown -s -t 00 to turn computer off immediately] or [Shutdown -r -t 00 to restart computer immediately ]

9.Tasklist: Help display the list if currently running task on your computer

Working with Files & Folders using Windows Command Line

10.Echo: Helps to display any string (i.e text) in the command prompt or Helps to create a text file (E.g [Echo This is a text file > file.txt]) This will create a text file in the current directory called “file.txt”

11.Mkdir: Creates a new folder or directory in the current folder or directory (E.g [Mkdir FolderName])

12.Dir: Helps to list the content of a current directory

13.Cd:Helps to switch to a different directory

14.Cd..:Helps to switch back to previous directory

15:Rmdir: Helps to remove or delete a directory and it has been emptied (E.g [Rmdir FolderName])

16.Del: Helps to delete a file from a directory

17.Move: Helps to move or cut a file from one directory to another (E.g [Move file1 c:\destinationFolder ])

18.Copy: Helps to copy a file from one directory to another (E.g [Copy file1 c:\destinationFolder ])

When deploying the windows agent you can remote execute windows commands. Here are the Top 20 most useful ones:

Speedtest - the windows cli version from Ookla is a great tool to remotely check throughput and latency.

pathping - built-in windows tool similar to mtr from Linux

curl ifconfig.me - will return your public IP address

dig - useful Linux tool for DNS testing. Download using these instructions. The following command uses dig to find out which dns you are using.

whois - Download the whois command from this location.

You can now find out to whom the above DNS server belongs from the query above.

netsh wlan show interfaces - determine the WiFi signal strength

iperf - Download from . Use these servers from RocketNet: (UK WACS): iperf-uk1.rocketnet.co.za, (US EAST): iperf-us1.rocketnet.co.za and ZA (LOCAL): iperf-za1.rocketnet.co.za or these server from Cool Ideas: (Cape Town) ter-cpt-iperf-1.cisp.co.za, (Isando) ter-jhb-iperf-1.cisp.co.za, (Rosebank) is-jhb-iperf-1.cisp.co.za, (London) tele-lon-iperf.cisp.co.za and (London) queen.cisp.co.za.

In the last few years, there has been a renaissance in command-line utilities. If you are still using utilities written 30 years ago (groan) you will be in for a surprise. The functionality might be the same but the UX(or is it developer experience) is a million times better.

These are some of the best command line utilities I've come across, ones I highly recommend.

Zsh shell with Oh-My-Zsh

Links

Install Zsh: https://gist.github.com/derhuerst/12a1558a4b408b3b2b6e Oh My zsh: https://ohmyz.sh/

Not technically a command line utility, but a full blown replacement for bash. For a long time, I wondered if it was worth the hassle of learning a new shell, but boy does Zsh blow bash out of the water. So much so that it's the first thing I install on any remote machine, if I plan to use it for more than 10 minutes.

Zsh has a much better UX than bash. Bash allows tab completion, but if you forget the name of the file/folder, or get the case wrong, it won't complete but just sit there stupidly. Even Windows Powershell is better in this regard as it allows case insensitive tab completions. Zsh goes one step further-- if you have multiple files/folders, you can select between them using your cursor:

Top the best command-line tools in windows năm 2024

There are dozens of such small improvements that I can't go over all of them. Like if you type one letter and press up, it shows you the last command you ran. Like if I type g and press up, I get git pull which I ran last

Top the best command-line tools in windows năm 2024

All these minor improvements are great, but the best feature of Zsh is the Oh-my-Zsh add-ons. They contain shortcuts for popular commands which make typing really easy.

As for git, I do

gcam "message"
gp

The above are short cuts for git commit -am "message"; git push

For docker compose instead of:

docker-compose down
docker-compose pull
docker-compose up -detached

I can do:

dcdn
dcpull
dcupd

dcupd is a lot quicker to type than docker-compose up -detached. There are short cuts for all the major utilities.

Zsh is worth the time spent learning it.

FdFind (also known as just fd)

Link: https://github.com/sharkdp/fd

find is my favourite Linux tool, it is super powerful if you want to find files in the current folder or subfolders.

And yet, every time I use it, I pull my hair.

  • The default search is not case sensitive
  • The absolutely worst part-- find expects you to tell you where to search and will exit with a generic error if you don't specify. And each time I scream Just chucking search in the current directory!

Instead, you have to add a . to let it know to search in the current directory. It still doesn't always find the file if you get the case wrong:

Top the best command-line tools in windows năm 2024

Above it just lists all the files in the directory and expects you to manually search through it-- I guess? Because I have nothing better to do?

Fd automatically searches in the current directory, searches case insensitively

Top the best command-line tools in windows năm 2024

And it colour codes the output, so you know which is the directory and which is the file.

And it's super fast.

Duf And Dust

Links: duf: https://github.com/muesli/duf dust: https://github.com/bootandy/dust

Duf and Dust as a replacement for duf and du respectively on Linux-- I often use these together so I will talk about them together. As you will see, they both work well together.

du or duf are used to find out how much free space the various drives on your device have. df or dust are used to find out which folders on your drive are taking up the most space.

So if Im seeing disk problems, I'll use duf to find how much free space I have, then dust to find which folders and which subfolders/files are taking up the most space

The problem with both du and df is they dump a lot of info on you and expect you to make sense of them. Again, very poor UX and it's often painful. Previously I've written Python scripts to make sense of this, but the newer duf and dust make this a breeze.

A comparison of df and duf:

df first:

Top the best command-line tools in windows năm 2024

What does 1k-blocks mean? Also, it tells me I have 233583156 bytes free-- what the hell is that? Are we back in the 5.25 inch floppy disk days where you could measure file size in bytes? (There is a flag to get the size in human readable form but I can never remember what it is)

Compare duf:

Top the best command-line tools in windows năm 2024

I can immediately see I have 222GB free. Also look at the Use% column, to which I added an arrow-- it shows me visually that most of my disk is free.

Both show the same data, but I have to spend 10-20 minutes with du finding the correct flags and then understanding the output. In duf I get the same result in 5 seconds.

Now du vs dust:

du first:

Top the best command-line tools in windows năm 2024

du, by default, just dumps everything on the screen-- all the files in all subfolders with their sizes in bytes. Now there are bytes to show the sizes by folder in human readable format, but groan what the chuck.

Now compare dust:

Top the best command-line tools in windows năm 2024

Wow! In a few seconds, I see:

  • The playwright folder takes 50% of space
  • The jupy-lite takes another big chunk, but a large part of that is the myenv folder, which is my Python virtual environment.

So to save some quick space, I can just delete the myenv folder as I can always recreate it.

This is the default output, no Googling for weird flags or converting bytes to MB/GB in my head.

Duf/Dust rule

tldr

Link: https://github.com/tldr-pages/tldr-python-client

I chucking hate man pages, though everyone else seems to love them. Usually, I just want to know how to use a command to do some fairly basic thing. Instead, I'm given a 500 page man entry that gives every single option, some of which even the developer never used.

95% of the time, you just want the most basic use case: Unzip a file, untar an archive you downloaded

Enter tldr. Originally a web project (https://tldr.ostera.io/) there are many command line versions for it. I prefer https://github.com/tldr-pages/tldr-python-client though there are versions for node etc

Here is the man page for unzip. It's a really long gif because its a long man page:

Top the best command-line tools in windows năm 2024

Now, this isn't even the longest man page I've seen, and it does have examples at the end (not all do). And yet, it's painful to read.

Now compare with tldr:

Top the best command-line tools in windows năm 2024

Short and to the point: It covers 4-5 of the most common use cases.

Let me just emphasise: Don't use man pages, use tldr. At least if you value your time.

Ripgrep

Link: https://github.com/BurntSushi/ripgrep

ripgrep is a superfast tool to search for text / regex pattern inside files. It's much more powerful and faster than standard grep.

If you use Vs Code, the search within files uses ripgrep under the hood, so I'm guessing a lot more people are using the tool than you may expect.

Some Good, but not great ones

These are some tools that I don't find critical, just nice to have

The Fuck

Link https://github.com/nvbn/thefuck

Yes, that is the name: The Fuck

It was a great utility for fixing errors and typos on the command line; but recently I've found it's dead slow. There is an experimental mode to speed things up, but it has been in "experimental" state for years now. It didn't work for me.

So while I used TheFuck a lot, I've sort of moved away from it.

2 good enough

Both of the below add pretty colors to ls and cat-- but I found they aren't that "killer" to replace my workflow. Still good to have.

What is the best command line tool in Windows 10?

10 – netsh – 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. It capabilities include: Enable or disable ICMP Echo Request (for pinging) in Windows firewall:

Is the command prompt a good tool?

For many Windows users, the thought of using the Command Prompt is either a scary experience or something that they will never need. But for some, the command prompt is a powerful tool that can be far more useful than many graphical tools available in Windows.

Are CMD commands still useful in Windows 8 and 10?

The command prompt is slowly disappearing from the Windows interface and for good reasons: CMD commands are an antiquated and mostly unnecessary tool from an era of text-based input. But many commands remain useful, and Windows 8 and 10 even added new features. Here we present the essential commands every Windows user must know.

What is a command prompt in Windows 10?

A command prompt is a text-based window that gives you access to the computer’s underlying commands. The most common use of this tool in Windows is through the Command Prompt program, which has been part of Microsoft’s operating system for decades. For many users, their first introduction was with MSDOS (Microsoft Disk Operating System).

What is the best CLI for Windows?

Top 15 Terminal Emulator for Windows.

KiTTY. ... .

Xshell terminal emulator. ... .

ConsoleZ – an enhancement for Windows console. ... .

Console2 – best terminal emulators and command prompt for Windows. ... .

12 – z/Scope Terminal Emulator. ... .

Hyper – a cross-platform terminal emulator. ... .

FireCMD. ... .

Terminus – an open source windows terminal emulator..

What is the best Command Prompt for Windows 10?

10 useful Windows command line prompts you should try.

1 Tasklist. My list starts with Tasklist. ... .

2 Chkdsk. Next up is Chkdsk. ... .

3 Sfc /scannow. My third most used command is Sfc /scannow. ... .

4 Diskpart. Next up is Diskpart. ... .

5 Ver. Need to know the version of Windows you're running? ... .

6 Systeminfo. ... .

7 Ipconfig. ... .

8 Ping..

The three most popular operating systems and their command-line interface names are:.

Windows: Command Prompt..

Linux: Bash (Bourne Again Shell).

MacOs: Terminal..

What is the command line tool for Windows?

Windows has two command-line shells: the Command shell and PowerShell. Each shell is a software program that provides direct communication between you and the operating system or application, providing an environment to automate IT operations.