News

Why Windows Users Should Go Back To The Command Line

Command Line Interfaces (CLI) are often repudiated by many Windows users, who perceive them as ancient, archaic and anachronistic. This culture began to settle, possibly after the arrival of the NT kernel to the mass-oriented desktop operating systems, more specifically from Windows 2000 and XP. However, since the launch of Windows 10, the company has decided to vitaminize the CLI, enhancing a PowerShell that was already a few years old and developing things like WinGet, a package manager inspired by those available for Linux.

It may seem that those who use the command line are people trying to demonstrate some kind of moral superiority, but nothing could be further from the truth. The reason why the console is still widely used in sectors such as programming is because it is more transparent and much faster than hitting clicks, as well as being more efficient once it is mastered. This has been a constant since graphical interfaces have been around.

However, this is not to say that you have to go back 50 years in time, as graphical interfaces (GUIs) are easier to learn and superior in flexibility, customization, and multitasking management. The smart thing in the end is not to confront the GUI with the CLI, but to know how to use the best interface according to the circumstances.

You don’t have to beat around the bush to find examples where using one of the interfaces is more convenient than the other. An office worker will surely work with an office suite that will work through a GUI, since such software could be complex to handle with a command line or a semi-graphical interface.

On the other hand, a Ruby on Rails developer, a framework For the creation of web applications, you will see the command line as a better tool thanks to the precision and transparency that it offers when performing certain actions (such as the use of generators), although it is likely that you edit the code using some graphical application like SublimeText or Visual Studio Code.

Did you know that the command line interface can be useful for you?

The command line interface has long been seen as geared towards advanced users, but the reality is that it can also be very useful for users who do not have deep knowledge. Yes, as you are reading.

It is not about learning to use a command line, but more specifically about benefiting from one of its main virtues: speed. Using Linux, we are going to give an example of why the use of the command line can be beneficial for the user who does not have deep computer knowledge.

For years there have been Linux distributions that work graphically and are very friendly, but possibly due to the slow maturation of GUIs and automation, people used to this system have never lost the habit of using the command line.

Where Linux users see the use of the command line faster is in the initial configuration of the operating system, and for this we are going to present the case of Fedora Workstation, one of the editions of the community distribution sponsored by Red Hat. This system can be configured graphically if the commands are seen as lists of packages, but no matter how much one runs with DNFDragora, it will never reach the speed that is obtained with the terminal.

Here is an example of the installing media on Fedora 35 Workstation copying and pasting the main install command:

And here looking for the packages through DNFDragora, the graphical package manager available for the system:

Select packages one by one in a graphical Linux package manager

In the first case, the user only has to copy the command, paste it into the console, press enter and confirm the changes, while with the graphical package manager the task is more complicated by having to first select the architecture and then enter at least partially the name of the packages, select them one by one, perform another search to select again, and so on until you have everything and then click on ‘Apply’. If the images have not spoken for themselves, surely the explanation has done so because the installation through the graphical interface is much more complicated than with the command line.

At this point, some may begin to see that the excessive support of many Windows users in the GUIs has made them less efficient at performing certain specific tasks. Added to this are the serious inconsistencies that at least Windows 10 has dragged, which hinders the navigation between advanced options for those who tend to use operating systems instinctively (such as this server).

The graphical interfaces are more comfortable, but in a complex tutorial in text format they increase the possibility that the user makes mistakes when dealing with a menu or a window, and that without counting the constant changes that Microsoft introduces in Windows from the beginning. version 10, which can make tutorials obsolete overnight. Here the command line wins by offering a more consistent interface and apparently less changeable over time.

Put more explicitly, Windows users, even those without advanced knowledge, should have more tutorials made of copy and paste commands and less of looking at windows, since the CLI tutorials are faster to run, more consistent at the interface level and theoretically more durable over time.

What command line interfaces are there for Windows?

Microsoft makes two command line interfaces available for Windows: Command Prompt (better known as CMD) and PowerShell.

CMD is a command line interpreter available for OS / 2, eComStation, ArcaOS, Windows (NT and CE families), and ReactOS operating systems, although it is important to note that not all CMD implementations work the same. It is a fairly veteran development since it started in 1987 and is the successor to COMMAND.COM used by default in MS-DOS, Windows 95 and 98, Windows 98 SE and Windows Me.

CMD is mostly compatible with COMMAND.COM and uses, at least basically, the same internal commandsSo whoever knows how to use the MS-DOS console will know how to use this interface built into Windows NT. However, Command Prompt offers some additional extensions, such as more detailed error messages, support for navigating through the command history using the up and down arrow keys, command line completion for file and folder paths , treating the caret (^) character as an escape one, and supporting delayed variable expansion with ‘SETLOCAL EnableDelayedExpansion’.

Despite its long standing and the existence of a successor, CMD is still pre-installed on Windows and still widely used as CLI by some users of the Microsoft system.

CMD or Command Prompt in Windows 10.

CMD or Command Prompt in Windows 10.

For its part, PowerShell it is quite a bit more recent than CMD. Having been “born” in 2006, Microsoft’s intention with its creation was to provide a More modern object-oriented shell for system administration and task automation.

PowerShell has a close relationship with the framework .NET because the first is compiled with the tools of the second. PowerShell is geared towards automating tasks and designed not only to interact closely with Windows, but also with other leading Microsoft products such as SQL Server, Exchange, and IIS.

In short, PowerShell is a next-generation command line interpreter that aims to better meet current demands when managing an operating system and certain tools, mainly those that are a close part of the Redmond giant.

While PowerShell was exclusive to Windows for its first 10 years of existence, Microsoft made the decision in 2016 to make it Open Source and multiplatform, so since that year it is also available for Linux and macOS. The company has kept some letters in the opening of the technology, but has maintained the close relationship with .NET even beyond its own operating system.

Since Satya Nadella rose to the position of CEO of Microsoft, it is not uncommon to see the company’s prominent products have versions for Linux and macOS. The surprising release of the .NET server part of the code was the starting gun for a trend that has remained strong thanks to the wide acceptance that, for example, Visual Studio Code has had.

PowerShell in Windows 10

PowerShell in Windows 10

conclusion

At this point, one wonders if certain Windows users are really more modern when they stick to graphical interfaces or if they have become less efficient when it comes to configuring or fixing certain specific things on their computers.

Many tutorials would be simpler, clearer, easier to follow, and faster to run if instead of displaying a large number of screenshots, you only had to copy a series of CMD or PowerShell commands. What’s more, in reality the tutorials in which the console is necessary in Windows have never finished disappearing, but the widespread culture among users of the Microsoft system has ended up causing a high percentage of them to reject the CLI outright.

Should Windows users get back into the habit of using the command line? It is obvious that using a CLI for common tasks is absurd, but such an interface still has a lot to say in our times due to the advantages it retains over GUIs.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *