The Windows Command Line Beginner's Guide: Second Edition
4/5
()
Command Prompt
Command Line Interface
Windows
Windows Operating System
Command Line
Chosen One
Prophecy
Secret Society
Dark Lord
Epic Quest
Hidden Power
Ancient Evil
Lost Kingdom
Magic Sword
Security
Batch Files
File Management
Ebook
Beginner's Guide
File Attributes
About this ebook
The Windows Command Line Beginner's Guide gives users new to the Windows command line an overview of the Command Prompt, from simple tasks to network configuration.
In the Guide, you'll learn how to:
-Manage the Command Prompt.
-Copy & paste from the Windows Command Prompt.
-Create batch files.
-Remotely manage Windows machines from the command line.
-Manage disks, partitions, and volumes.
-Set an IP address and configure other network settings.
-Set and manage NTFS and file sharing permissions.
-Customize and modify the Command Prompt.
-Create and manage file shares.
-Copy, move, and delete files and directories from the command line.
-And many other topics.
Jonathan Moeller
Standing over six feet tall, Jonathan Moeller has the piercing blue eyes of a Conan of Cimmeria, the bronze-colored hair of a Visigothic warrior-king, and the stern visage of a captain of men, none of which are useful in his career as a computer repairman, alas.He has written the "Demonsouled" trilogy of sword-and-sorcery novels, and continues to write the "Ghosts" sequence about assassin and spy Caina Amalas, the "$0.99 Beginner's Guide" series of computer books, and numerous other works.Visit his website at:http://www.jonathanmoeller.comVisit his technology blog at:http://www.jonathanmoeller.com/screed
Read more from Jonathan Moeller
Sevenfold Sword: Champion Rating: 5 out of 5 stars5/5Frostborn: The Gorgon Spirit Rating: 4 out of 5 stars4/5Frostborn: The Broken Mage Rating: 4 out of 5 stars4/5Frostborn Omnibus One Rating: 4 out of 5 stars4/5Frostborn: The First Quest Rating: 3 out of 5 stars3/5Cloak of Illusion Rating: 5 out of 5 stars5/5Cloak of Titans Rating: 5 out of 5 stars5/5Frostborn: The World Gate Rating: 4 out of 5 stars4/5Frostborn: The High Lords Rating: 4 out of 5 stars4/5Dragonskull: Fury of the Barbarians Rating: 5 out of 5 stars5/5Dragonskull: Blade of the Elves Rating: 5 out of 5 stars5/5The Linux Mint Beginner's Guide Rating: 5 out of 5 stars5/5Frostborn: The False King Rating: 4 out of 5 stars4/5Ghost in the Veils Rating: 4 out of 5 stars4/5Dragonskull: Doom of the Sorceress Rating: 5 out of 5 stars5/5Dragonskull: Wrath of the Warlock Rating: 5 out of 5 stars5/5Frostborn: Excalibur Rating: 4 out of 5 stars4/5Windows 10: 101 Tips & Tricks Rating: 4 out of 5 stars4/5Cloak of Embers Rating: 5 out of 5 stars5/5Sevenfold Sword: Sorceress Rating: 5 out of 5 stars5/5Dragonskull: Curse of the Orcs Rating: 5 out of 5 stars5/5False Image Rating: 4 out of 5 stars4/5Dragonskull: Sword of the Squire Rating: 5 out of 5 stars5/5Dragonskull: Crown of the Gods Rating: 5 out of 5 stars5/5Ghost in the Tombs Rating: 4 out of 5 stars4/5Dragonskull: Shield of the Knight Rating: 4 out of 5 stars4/5Ubuntu: 101 Tips & Tricks Rating: 0 out of 5 stars0 ratingsFrostborn: The Dwarven Prince Rating: 4 out of 5 stars4/5Dragonskull: Talons of the Sorcerer Rating: 5 out of 5 stars5/5
Related to The Windows Command Line Beginner's Guide
Related ebooks
Simply Linux: Basics Rating: 5 out of 5 stars5/5The Linux Command Line Beginner's Guide Rating: 4 out of 5 stars4/520 Windows Tools Every SysAdmin Should Know Rating: 5 out of 5 stars5/5PowerShell: A Comprehensive Guide to Windows PowerShell Rating: 4 out of 5 stars4/5Windows Command Prompt Rating: 0 out of 5 stars0 ratingsLinux Essentials - A Beginner's Guide To Linux Operating System Rating: 3 out of 5 stars3/5Going Text: Mastering the Command Line Rating: 4 out of 5 stars4/5Windows 10: 101 Tips & Tricks Rating: 4 out of 5 stars4/5TCP/IP for Everyone Rating: 4 out of 5 stars4/5The Complete Powershell Training for Beginners Rating: 0 out of 5 stars0 ratingsLinux Command-Line Tips & Tricks Rating: 0 out of 5 stars0 ratingsLinux Commands By Example Rating: 5 out of 5 stars5/5Windows 10 Rating: 5 out of 5 stars5/5Linux for Beginners: Linux Command Line, Linux Programming and Linux Operating System Rating: 4 out of 5 stars4/5Ubuntu Linux Toolbox: 1000+ Commands for Power Users Rating: 3 out of 5 stars3/5Let's Use BASH on Windows 10! Rating: 0 out of 5 stars0 ratingsPowerShell: A Beginner's Guide to Windows PowerShell Rating: 4 out of 5 stars4/5Windows 10: A Complete Guide to Using Windows 10 Rating: 0 out of 5 stars0 ratingsThe Linux Mint Beginner's Guide Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Make Your PC Stable and Fast: What Microsoft Forgot to Tell You Rating: 4 out of 5 stars4/5Linux: A complete guide to Linux command line for beginners, and how to get started with the Linux operating system! Rating: 0 out of 5 stars0 ratingsWindows Batch File Programming Rating: 2 out of 5 stars2/5Easy Linux For Beginners Rating: 2 out of 5 stars2/5Windows 10: The ultimate Windows 10 user guide and manual! Rating: 0 out of 5 stars0 ratingsAn Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5The Mac Terminal Reference and Scripting Primer Rating: 4 out of 5 stars4/5Basics with Windows Powershell Rating: 0 out of 5 stars0 ratings
Operating Systems For You
iPhone Unlocked Rating: 0 out of 5 stars0 ratingsLinux Bible Rating: 0 out of 5 stars0 ratingsLinux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5macOS Sonoma For Dummies Rating: 0 out of 5 stars0 ratingsThe iPadOS 17: The Complete User Manual to Quick Set Up and Mastering the iPadOS 17 with New Features, Pictures, Tips, and Tricks Rating: 0 out of 5 stars0 ratingsUbuntu Linux Bible Rating: 0 out of 5 stars0 ratingsNetworking for System Administrators: IT Mastery, #5 Rating: 5 out of 5 stars5/5MacBook Pro User Manual: 2022 MacBook Pro User Guide for beginners and seniors to Master Macbook Pro like a Pro Rating: 0 out of 5 stars0 ratingsiPhone For Dummies Rating: 0 out of 5 stars0 ratingsMake Your PC Stable and Fast: What Microsoft Forgot to Tell You Rating: 4 out of 5 stars4/5Mastering Microsoft Teams: Creating a Hub for Successful Teamwork in Office 365 Rating: 0 out of 5 stars0 ratingsMastering Windows PowerShell Scripting Rating: 4 out of 5 stars4/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Windows 11 All-in-One For Dummies Rating: 5 out of 5 stars5/5Hacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5Apple Card and Apple Pay: A Ridiculously Simple Guide to Mobile Payments Rating: 0 out of 5 stars0 ratingsWindows 11 For Dummies Rating: 0 out of 5 stars0 ratingsLinux Command-Line Tips & Tricks Rating: 0 out of 5 stars0 ratingsExploring Windows 11: The Illustrated, Practical Guide to Using Microsoft Windows Rating: 0 out of 5 stars0 ratingsLinux: A complete guide to Linux command line for beginners, and how to get started with the Linux operating system! Rating: 0 out of 5 stars0 ratingsMastering Linux Shell Scripting,: A practical guide to Linux command-line, Bash scripting, and Shell programming Rating: 0 out of 5 stars0 ratingsTor Darknet Bundle: Master the Art of Invisibility Rating: 0 out of 5 stars0 ratingsMAC OS X UNIX Toolbox: 1000+ Commands for the Mac OS X Rating: 0 out of 5 stars0 ratingsBash Command Line Pro Tips Rating: 5 out of 5 stars5/5Linux for Beginners: Linux Command Line, Linux Programming and Linux Operating System Rating: 4 out of 5 stars4/5
Reviews for The Windows Command Line Beginner's Guide
4 ratings0 reviews
Book preview
The Windows Command Line Beginner's Guide - Jonathan Moeller
THE WINDOWS COMMAND LINE BEGINNER'S GUIDE - SECOND EDITION
Jonathan Moeller
***
Description
The Windows Command Line Beginner's Guide gives users new to the Windows command line an overview of the Command Prompt, from simple tasks to network configuration.
In the Guide, you'll learn how to:
-Manage the Command Prompt.
-Copy & paste from the Windows Command Prompt.
-Create batch files.
-Remotely manage Windows machines from the command line.
-Manage disks, partitions, and volumes.
-Set an IP address and configure other network settings.
-Set and manage NTFS and file sharing permissions.
-Customize and modify the Command Prompt.
-Create and manage file shares.
-Copy, move, and delete files and directories from the command line.
-Manage processes from the command line.
-And many other topics.
***
The Windows Command Line Beginner's Guide
Jonathan Moeller
Copyright 2011 by Jonathan Moeller.
Cover image copyright ID 34244305 © Citalliance | Dreamstime.com.
Originally published in ebook format September 2011.
Smashwords Edition
All Rights Reserved.
Trademarked names may appear in this book. Rather than use a trademark symbol with every appearance of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The information in this book is distributed on an as is
basis without warranty. Although every precaution has been taken in the preparation of this work, neither the author nor the publishers shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.
***
Introduction
Welcome to The Windows Command Line Beginner’s Guide!
If you’re reading this book, you have the opportunity to benefit from the power and flexibility of the Windows command line. Novice users can use the Windows command prompt to make repetitive tasks far quicker and easier, while advanced users can modify network settings, alter system configurations, and even use the command line to remotely control distant Windows machines.
WHAT IS THE WINDOWS COMMAND LINE?
Generally, the Windows command line
refers to a program called the Command Prompt
, or CMD.EXE, that has been included with every version of Windows since Windows 2000. CMD.EXE is Windows’s built-in commander interpreter. If you’re not familiar with the term, a command interpreter
is a program that takes lines of text entered by the computer operator (i.e, you) and converts them into commands the computer can understand. A command prompt is commonly referred to as a command-line interface or a CLI.
With the Windows Command Prompt, you can open up a command-line window on your Windows system. Within Command Prompt’s window, you can use the full range of command-line utilities included with the system. You can even open multiple command-line windows, if you want to run more than one command at once.
Of course, nowadays most computers use a graphical user interface (abbreviated GUI), with a mouse pointer, windows, scroll bars, icons, and other graphical metaphors instead of text commands. In fact, a great majority of computer users have never even used a command-line interface. Windows is famous for its graphical interface – even its name, Windows
, refers to the graphical windows drawn on the screen of a Windows desktop or server computer. It might seem surprising that an operating system that relies upon a GUI like Windows still includes something as apparently archaic as a command-line interface.
However, Windows owes its existence to an older and simpler operating system – Microsoft Disk Operating System, MS-DOS, or as it is more commonly known, DOS. DOS originated during the early days of the personal computer revolution in the late 1970s and the early 1980s. As the personal computer market grew, IBM, a major manufacturer of high-powered mainframe computers, decided to market its own personal computer. Rather than designing specific IBM components for its personal computer, IBM decided to use off-the-shelf parts, and bought the operating system – specifically, MS-DOS, from a small Seattle company called Microsoft. IBM let Microsoft keep the rights to DOS, figuring that the real value of a personal computer lay in the hardware, not the software.
(IBM would come to regret this decision.)
As the IBM PC, and later IBM PC compatibles, took off, the PC platform faced competition from Apple’s Macintosh computer. The Macintosh relied on a GUI, which was far more user-friendly than the white text interface and cryptic error messages of the early versions of DOS. Recognizing the danger, Microsoft and IBM began joint work on a next-generation 32-bit graphical operating system called OS/2. Eventually Microsoft and IBM broke their alliance, leaving IBM with sole control over OS/2.
Microsoft pursued its own line of graphical operating systems, which it named Windows.
The early versions of Windows were a graphical shell riding upon DOS – the user typed win
at the command line to launch the Windows interface. The early versions of Windows – 3.0, 3.1, and 3.11, all were graphical interfaces on top of the old DOS operating system. Even the Windows 9x line of operating systems – 95, 98, and Millennium Edition – ran on top of DOS.
However, Microsoft had created a 32-bit version of Windows called Windows NT (the NT
stood for new technology
) to compete with IBM’s OS/2. Unlike the Windows 9x line of operating systems, NT was a truly graphical operating system – the GUI did not run on top of DOS. With the release of Windows XP in 2001, Microsoft’s consumer-based line of operating systems merged with the NT line of operating systems (Windows XP was technically Windows NT 5.1), and the days of DOS had come to an end.
However, Windows XP still kept the command-line interface in the form of the Command Prompt application. Windows Vista and Windows 7 & 8 followed suit, as did Microsoft’s line of server operating systems – Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, and Windows Server 2012. DOS is history, but thanks to the Command Prompt application, you can still use the old DOS commands on a modern Windows system.
WHY LEARN THE COMMAND LINE?
You might wonder why you would want to learn the command line, since Windows comes with a perfectly fine graphical user interface. Just because Windows comes with the command line doesn’t mean you have to run it, after all. And what possible use could you get out of it?
For one, the command line permits you to perform numerous repetitive and tedious computing tasks far more quickly. For example, let’s say you need to copy a large number of JPEG image files out of your Pictures folder and onto your flash drive (which Windows has assigned the letter J:). Your JPEGS are named for the month and day they were taken – August01.JPEG, March01.JPEG, and so forth. Specifically, let’s say that you need to copy every JPEG taken in the month of August to your flash drive.
To copy the files, you could drag-and-drop every single one of the files, or CTRL-click each of the files, and then drag them to your flash drive. Either way, it would take a great deal of bother and hassle.
Or you could simply type this command at the Command Prompt:
COPY c:\username\pictures\August*.JPEG J:\
This command will copy every JPEG file beginning with August
in your Pictures folder to your flash drive. Needless to say, this is vastly more efficient than dragging and dropping, copying & pasting, or CTRL-clicking from the GUI.
Information technology professionals, such as help desk technicians and network administrators, have an even greater motivation to learn the command line. Everything in Windows can be done through the GUI. However, many tasks can be performed far more efficiently at the Command Prompt. In particular, it is easier to do numerous network tasks from the command line than through the GUI. For example, finding your IP address on a Windows 7 desktop system takes five different mouse clicks and four separate dialog boxes. Finding your computer's IP address from the Command Prompt takes one brief command.
And on a Windows system, many network diagnostic tools are available only through the command line. If your system loses its network connection, the graphical tools aren't terribly helpful. The command line utilities are far more efficient at discovering the root of the problem, if you know how to use them properly.
Finally, the command line offers the advantage of automation. An IT professional will often find himself dealing with repetitive and tedious tasks. Using the Command Prompt, is possible to create simple scripts called batch files
to deal with these boring jobs. Instead of typing the same sequence of commands over and over again, or wading through graphical menu after graphical menu, a well-written batch file can handle these tasks with a single typed command.
THE PURPOSE OF THIS BOOK
The purpose of this book is to provide a basic introduction to using the Windows Command Prompt. It's not intended as an exhaustive or comprehensive overview, but as an introduction to the topic - enough to get you started, and comfortable enough to start experimenting on your own. (Feel free to jump around if a particular topic interests you more than the others.) We can divide this book into three parts:
-Part I: Command line basics and file management basics.
-Part II: Networking.
-Part III: Advanced tasks - disk management, remote management, batch files, and others.
WHY I WROTE THIS BOOK
I began writing about computers and technology almost by accident. I started my writing career as a writer of fantasy fiction (my sword-and-sorcery