List of commands on the command line. cmd command line. Command line cmd, feel like a hacker. List of basic command line commands
Using Windows CMD commands, you can launch system utilities much faster than doing it in the usual way. And, although not everyone understands the meaning of this text-based interface, considering it outdated, in fact, the tool is quite useful.
And not only for professionals, but also for ordinary users. Although, to run most commands, you should run the command line (cmd) as an administrator.
The need to use the command line
The cmd line, which is a standard tool of the Windows platform, is no different in different versions of operating systems - in the seventh, and in the eighth, and in the tenth, and even in XP. And all teams work the same in each of them.
The advantage of using a line is to speed up the work - sometimes typing the desired command is much faster than searching the system folders for the corresponding file. Moreover, to speed up work with CMD, a link to it can be displayed on the desktop - or even on the quick launch bar.
The disadvantages of the interface can be called:
- manual command input from the keyboard;
- the need to run CMD as an administrator (otherwise, most commands do not run);
- quite a large list of commands that are difficult to remember.
Externally, the command line in many ways resembles the interface of the DOS system. And, although it allows you to solve many more tasks, some commands overlap with the legacy platform. For example, "format", "cd" and "dir", which are necessary for working with folders and disks.
Working with the interface
Before you start working with the command line, you must first start it. To do this, you can use several methods:
- Open the "Run" menu (by pressing Win + R at the same time) and enter the command cmd.exe;
- Go to the Windows folder on the system drive, open the System32 directory and run the file called cmd.exe. You can simplify the task by creating a shortcut that launches the same application and install it on the desktop;
- Open the "Start" menu, go to the "All Programs" section, then to the "Accessories" subsection and find the command prompt.
Things to know: After the first launch through the Start menu, CMD appears at the top of it - in the list of most frequently launched applications and utilities. And you can open the line while working in any application (even in the game), just by pressing the Win button on the keyboard.
Rice. 1. Command line of the Windows operating system.
standard view command line is a black box with white text. If this option does not suit the user, he can change the colors depending on his preferences.
To do this, right-click on the top of the window and go to the properties of CMD. In the window that opens, you can choose the location of the line, and the colors of the text or window, and even the font sizes. Here it is also possible to expand the interface to almost the entire screen, increasing the level of convenience of working with it.
Rice. 2. Change command line settings
Commands to help you work with CMD
Keyboard shortcuts help make using the command line even easier - although they are not the same as the usual Windows combinations. Instead of pressing standard sets Ctrl + C and Ctrl + V, copying and pasting text is done as follows:
- Click on the selected line open window CMD right click;
- Select "Mark";
- Select text with the left button;
- Right click again. After that, all information is in the operating system clipboard.
In order to paste the copied information, press the same right button and select the "Paste" item. You can simplify the copying of data by checking the box "Select by mouse" in the properties of the command line.
After that, the text can be immediately selected with the left button. If you uncheck the quick insert item, the data is inserted over the already written commands.
Hotkey List
When working with the command line, use the following "hot keys":
- up and down arrows allow you to move the cursor around the window, including already entered commands;
- Home and End move the cursor to the beginning and end of the line, respectively;
- the left and right arrows together with the Ctrl key pressed simultaneously allow you to move the cursor in a given direction by a whole word;
- Insert, just like in any text editor, toggles right-shift text insertion and overwriting over written data;
- Esc deletes the selected information;
- F1 provides the input of the last recorded command one character at a time;
- F5 prints the previous command;
- F7 lists the last few entries. By default, their number is 50.
Basic commands
The list of basic commands that most users need is relatively small and consists of commands that perform the following actions:
- work with directories;
- issue statistics on the operation of various applications, the network and the operating system as a whole;
- restore drivers;
- turn off the computer.
Using the command line, you can even format the drive (including the system drive, which is not formatted from the Windows system by any other means) and even stop the process. And yet, using CMD, the user gets much faster access to the registry editor and the window for changing the system configuration.
Working with directories
The main command for working with directories is dir. With its help, you can check the contents of an open directory. And, if you want to open another folder, you should additionally specify the path to it. For example, select "dir C:\" or "dir D:\".
Rice. 3. Checking the contents of logical drive C.
The second command for working with directories is cd. With its help, you can go to any selected folder. For example, by writing "cd C:\Windows" on the command line, go to the system directory. To open a folder on a drive that is already selected, issue a command like "cd /D D:\".
Rice. 4. Move from local drive C to drive D.
The mkdir command creates a new folder. And the parameter that is set after it determines the name of the directory. So, after entering "mkdir D:\New_Folder", the corresponding directory appears on drive D. If the user specifies several directories in the list at once (for example, "E:\New\Games\Fallout_3"), an entire folder tree can be created.
Rice. 5. Create a new folder from the command line.
Executing the rmdir command allows you to remove a directory by specifying the full path to it. For example, by writing "rmdir D:\New_Folder" you can delete the newly created folder. Although, if there are other files inside the directory, a message appears on the screen stating that it is not empty. You can delete a non-empty folder by typing rmdir /S in the command line. Before deleting, select the item "Y" (Yes), confirming your action.
Rice. 6. Deleting a folder using the rmdir command.
Turning off the computer
Using the shutdown command, you can turn off the computer - moreover, either immediately, or by setting a timer:
- shutdown /s simply terminates the operating system, closing all pending processes;
- when you select the shutdown /s /t 3600 command, the timer will be set to exactly one hour. If you want to set any other time, instead of 3600, the corresponding number of seconds is written;
Rice. 7. Enable automatic shutdown of the system.
- to cancel an already set timer, enter the shutdown /a command.
Rice. 8. Cancel shutdown.
Commands work the same in any operating system. The only difference is in the labels that appear. So, for example, for Windows 7 messages are located in the lower right corner of the desktop.
View statistics
Viewing computer statistics begins with the systeminfo command. It gives the maximum amount of information about Windows system. Although it is more efficient to use not system utility, but special applications.
For example, AIDA64 is a general-purpose data-gathering program whose only drawback is a shareware license. A month after use, you will have to pay for the utility - from 1400 to 2200 rubles. per computer, depending on the number of purchased licenses.
Rice. 9. Obtaining information about the computer and operating system.
The driverquery utility allows you to get acquainted with the list of drivers and their properties. In the list that appears on the screen, you can see the type control program, link date and module name.
Rice. 10. Displaying a list of drivers.
A utility called pathping, when run, shows information about the data lost in transit between the start and end points. This command calculates the loss factors for various routers. And according to the results of the work, the utilities determine access problems for individual routers.
Rice. 11. A utility that checks network operation.
The Netstat application shows information about active connections and statistics for various network protocols. If you run the command without specifying specific parameters, only TCP connections are displayed.
Rice. 12. Check for active TCP connections.
The tasklist command displays a list of all processes running on the system. With its help, you can get acquainted with the data received from a remote computer. Although, if additional parameters are not specified, information is displayed only about the current device.
The ipconfig utility displays information about the IP address and other network adapter settings. Additional options are used along with the command, such as /all, which allows you to get information about each of the adapters.
Rice. 13. Getting information about network connections.
Changing system settings
The msconfig utility allows you to call up a menu with which you can change the configuration of the operating system:
- a list of programs automatically loaded with the system;
- launch options;
- Windows boot options.
Most often, the command is used to remove or add an application to the startup tab. And sometimes they make changes to the boot order of operating systems - if two of them are installed on the computer (for example, Windows 10 and Windows XP, each of which may be more convenient for a particular user).
Rice. 14. Call the menu for changing the system configuration.
Running the regedit utility allows you to open the registry editor - one of the most useful applications with which to get rid of leftovers remote programs, make changes to services, and fix problems. It is worth noting that changing any values (not to mention deleting) is required very carefully. Errors in the registry can lead to system crashes and even reinstallation. Read also our material: TOP 3 cleaning programs Windows Registry 7.
Rice. 16. Start checking files on the system drive.
The format command, which has not changed for decades, allows you to format any disk, including USB flash drives. Selecting "format C:" formats the system partition. And with additional options, you can define a file system (/fs), set a volume label (/y), and even assign cluster sizes (/a). Without setting certain conditions, the cluster is installed automatically.
Rice. 17. Formatting disk H through the command line.
Stopping processes
The command can be used to stop a specific process. For this, an identifier can be used (for example, 2616, if we are talking about the graphical editor Paint) and the /pid parameter. In addition, when stopping, the name of the process itself and another /im parameter can be used. The same editor is closed with the taskkill /im MSPaint.exe command.
Rice. 19. A utility that restores damaged system files.
Screen cleaning
After executing several commands, the window is filled with text, which may be an obstacle for further work. You can get rid of unnecessary data using the CLS (Clear Screen) command. After its launch, the screen is completely cleared, leaving room for further user actions.
conclusions
With the constant use of basic commands, they are easily remembered by the user. And in order to learn about new utilities or remember the names of old ones, you need to enter /help on the command line. A list of possible commands will appear on the screen, which are unlikely to be useful for the average user, but can simplify the work of local network administrators.
Don't worry if you've never used the command line before. It's pretty simple. We will tell you everything you need to get started using it. Below you will find some of the most important commands for setting up your home network.
1. PING
PING is one of the basic and most useful CMD commands. It displays the quality of the connection, shows whether your computer can send data to the target IP address, and if so, at what speed.
Here is an example using the command:
The command operates according to the following principle: it sends out a certain number of data packets and determines how many of them returned back. If some of them did not return, she reports the loss. Packet loss leads to poor performance in games and webcasts. This is a great way to test your internet connection.
By default, the command sends four packets with a timeout of four seconds for each. You can increase the number of packets like this: ping www.google.com -n 10
You can also increase the timeout duration (displayed in milliseconds): ping www.google.com -w 6000
2.TRACERT
TRACERT stands for Trace Route. Like PING, the command sends out a packet of data to solve network problems. However, it does not determine the speed of sending and returning the packet, but its route.
Usage example:
The command displays a list of all routers through which data passes on the way to the end node. Why do we see three duration metrics for each router? Because TRACERT sends three data packets in case one of the routers gets lost or takes too long for some reason.
3. PATHPING
The PATHPING command is similar to TRACERT, but it is more informative and therefore takes more time to execute. It analyzes the route of data packets and determines at which intermediate nodes the loss occurred.
Usage example:
4. IPCONFIG
This command is most commonly used for network debugging in Windows. And it's not just the amount of information it provides, but also the fact that it is combined with several keys to execute certain commands.
Usage example:
When entered without keys, IPCONFIG reflects all the network adapters on your computer, as well as how they work. IPv4 Addresses and Default Gateway contain the most important information.
To flush the DNS cache, use the following switch: ipconfig /flushdns
This operation can help if the Internet is working, but you cannot get to some sites or servers.
5. GETMAC
Each IEEE 802 compliant device has a unique MAC (Media Access Control) address. The manufacturer assigns each piece of equipment its own address, which is registered in the device itself.
Usage example:
You may see multiple MAC addresses, depending on how many network adapters are installed on your computer. For example, Wi-Fi and Ethernet internet connections will have separate MAC addresses.
6.NSLOOKUP
NSLOOKUP stands for Name Server Lookup. The potential of this utility is huge, but most people don't need it. For ordinary users, only the ability to determine the IP address of a domain name is important.
Usage example:
Keep in mind that some domains are not tied to the same IP address, which means that you will receive a different address each time you enter the command. This is quite normal for large sites because they are loaded from a huge number of computers.
If you want to convert an IP address to a domain name, just type it into your browser and you'll see where it leads. However, not all IP addresses lead to domain names. Many of them cannot be reached through a web browser.
7.NETSTAT
This utility is a tool for collecting statistics, analysis and diagnostics. It is quite complex if you use its full potential (for example, configure local network enterprises).
Usage example:
By default, the command shows all active connections on your system. An active connection does not mean that data is being exchanged. It only indicates that a port is open somewhere, and the device is ready to connect.
The command also has several keys that change the type of information displayed. For example, the key -r will display the routing tables.
8.NETSH
NETSH stands for Network Shell. This command allows you to customize almost any network adapter on your computer in more detail.
When you type NETSH, the command line enters shell mode. Inside it there are several contexts (routing, DHCP-related commands, diagnostics).
You can see all contexts like this:
And you can see all the commands within the same context like this:
You can dig deeper and see a list of all subcommands within a single command:
For example, you can enter the following command to see all the network drivers and their characteristics on your system: netsh wlan show drivers
Keep in mind that if you really want to get serious about configuring your network through the command line, you will have to master this command.
The command line (command line, console, terminal) in the Windows operating system is designed to work with the system in text mode. The software shell is used to connect the user with the operating system by entering text commands from the computer keyboard.
Working with the command line proceeds as follows: the user launches the cmd.exe application on the computer, the command line interface window (command line interpreter) opens, then the user enters a command or sets of commands from the keyboard, the system executes them, sometimes issues prompts or messages displayed in command line interface window.
To perform various tasks on the computer: launching programs, configuring the system, changing Windows settings etc., you need to enter certain commands for the command line.
At the dawn of the creation of operating systems, the OS did not have a graphical interface, all actions were performed using commands typed on the keyboard. After the appearance of the graphical interface, the command line did not disappear from the system.
Most users, sooner or later, come across the command line, the other part of the users are not even aware of its existence.
The advantage of the command line is that the command line is independent of the GUI of the operating system. The user enters commands in a command prompt window, and the system executes them immediately. In some cases, this process is faster than similar steps using the Windows GUI.
The command line is often used when problems occur on the computer, when it is impossible to perform work to fix system failures in another way.
It is difficult for novice users to work with the command line due to the fact that they do not know the commands. Therefore, the command line is more often used by advanced users and administrators.
In this article you will find a list of command line commands. The table contains the main command line commands that work in the operating systems Windows 10, Windows 8.1, Windows 8, Windows 7.
How to run command line
In Windows 10, it is not immediately obvious to find the command line, so read the article about the different ways to launch the console in this OS.
In the Windows operating system, there are several ways to start the command line, here are the simplest ones:
- From the "Start" menu, go to "Programs" ("All Programs"), and then to "System Tools" (in Windows 7 - "Accessories"), select the "Command Prompt" application.
- In the search field, enter "cmd" (without quotes), among the results that open will be the command line.
- After pressing "Win" + "R" on the keyboard, in the "Run" window, enter the command to launch the command line "cmd" (without quotes).
In normal mode, the command line is run as the user. To perform some actions on the command line, you need elevated Computer Administrator rights. In this case, the command line must be run as an administrator. Read the article about the different versions of the Windows operating system.
How to run a command on the command line
Working on the command line is very simple: the user enters a text command, and then presses the "Enter" key (input). If you need to enter several consecutive commands, repeat this operation several times.
After launching the command line, the version of the Windows operating system is displayed in the command line interpreter window, and the location where the user is currently located. When started in normal mode, this is the address of the user profile on the system drive.
When running the command prompt as an administrator, the path looks like this: "C:\Windows\system32".
Windows command line commands must be entered in the interpreter window immediately after the ">" sign, the cursor blinks in this place.
To copy a command from a computer and then paste the command into the command line, use the right-click context menu. Copy the command to the clipboard, paste the mouse cursor into the command line window, click the right mouse button. Windows 10 supports copying and pasting using standard keyboard keys: "Ctrl" + "C" and "Ctrl" + "V".
Some system applications are launched immediately after entering a command that consists of the name of the application, for example, if you enter the “calc” command, then the Calculator system program will start on the computer.
For other programs, you will need to enter the full path to the application's executable file. If there are spaces in the path to the file, the full path is enclosed in quotation marks, for example, this is how the command to launch the browser looks like Google Chrome:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
After running a command from the command line, the execution of the command is not always visible externally, due to the fact that there are internal changes in the operating system.
Other parameters are often added to the main command, keys to perform specific actions.
If you enter an incorrect command, such as a misspelled one, or if the Windows operating system is unable to execute the command for any reason, a message will appear in the command line interface window.
Windows command line commands
The user can independently learn the basic commands from the Command Line utility itself. To do this, just enter the command: "help".
The CLI will display a list of basic commands.
To get information about the parameters of a particular command, you need to enter one of the following commands, which work in the same way (don't forget to include a space):
command_name /? help commandname
As a result, you will receive information about all the parameters of this command.
Windows Command Prompt: List of Basic Commands
Check out the table that summarizes the commands used in the Windows command line. If I missed any important command, write about it in the comment to this article, I add the command to the table.
Command | Action to take |
---|---|
appwiz.cpl | launching a system tool to change or remove programs |
arp | displaying and changing ARP tables for converting IP addresses to physical ones used by the address resolution protocol |
assoc | displaying or changing file name extension mappings |
at | launch programs at a specified time |
attrib | displaying and changing file attributes |
azman.msc | authorization manager |
bcdboot | tool to create and restore boot configuration data files |
bcdedit | editing changes in the system bootstrap database |
break | changing the processing mode of the key combination "Ctrl" + "C" |
blastcln | worm cleaning tool |
bootcfg | configuring, extracting, modifying, or removing command-line options in the Boot.ini file in Windows XP |
call | calling one batch file from another |
cacls | viewing and editing changing access control tables (ACL) to files |
calc | Launching the Calculator app |
cd | display name or change current folder |
charmap | symbol table |
chcp | print or change the active code page |
chdir | display or change the current folder |
copy | copy one or more files |
chkdsk | check disk for errors and display statistics |
chkntfs | output or change disk check options at boot time |
ciddaemon | file indexing service |
cipher | encrypting files and folders in NTFS |
cleanmgr | Disk Cleanup utility |
cls | screen cleaning |
cmd | launching another Windows command line interpreter |
compmgmt.msc | opening the computer management console |
color | setting default foreground and background colors |
comexp.msc | component services |
comp | comparing the contents of two files or two sets of files |
compact | viewing and changing file compression settings on NTFS partitions |
compmgmt.msc | Computer management |
computer defaults | selection of default applications |
control | Control Panel |
control admintools | administration |
control desktop | screen customization and personalization |
control folder | folder properties in explorer options |
control fonts | fonts |
control keyboard | opening the keyboard properties window |
control mouse | mouse properties |
control printer | devices and printers |
control schedules | Task Scheduler |
control userpasswords2 | |
convert | transformation file system FAT volumes to NTFS (does not work on the current drive) |
copy | copying files to another location |
credwiz | archiving and restoring usernames and passwords |
date | print or set the current date |
debug | debugging and program editing tool |
defrag | start disk defragmentation |
del | deleting one or more files |
desk.cpl | screen resolution setting |
device pairing wizard | adding a new device |
devmgmt.ms | Device Manager |
dfrgui | disk optimization (defragmentation) |
dir | listing files and subfolders from a specified folder |
diskmgmt.ms | opening the Disk Management snap-in |
diskpart | displaying and setting disk partition properties |
diskperf | enable or disable the performance counter |
dokey | command line editing, Windows command recall, macro creation |
dpiscaling | display settings |
dxdiag | DirectX diagnostic tool |
echo | displaying messages and switching the mode of displaying commands on the screen |
endlocal | end local environment changes for a batch file |
erase | deleting one or more files (wipe) |
esentutl | Microsoft Windows database maintenance utilities |
eudcedit | character editor |
event create | creating a special event entry in the specified event log |
eventvwr.msc | event viewer |
expand | decompress compressed files |
explorer | Windows Explorer |
fc | comparing files or sets of files, displaying the differences between them |
find | search for a text string in one or more files |
findstr | search for a text string in a file |
finger | information about the users of the specified system running the Finger service |
firewall.cpl | Windows Defender Firewall |
for | run the specified command for each file in the set |
format | disk formatting |
fsmgmt.msc | shared folders |
fsquirt | Bluetooth file transfer |
fsutil | displaying and setting file system properties |
ftype | inferring or changing file types when matching filenames |
ftp | FTP file sharing |
goto | transfer control to a specified line in a batch file |
getmac | display the MAC addresses of one or more network adapters |
gpresult | group policy information for a computer or user |
graftabl | display extended character set in Windows graphics mode |
gpedit.msc | Local Group Policy Editor |
gpupdate | updating multiple group policy settings |
hdwwiz | hardware installation wizard |
icacls | display, modify, archive, restore ACLs for files and directories |
iexpress | creating a self-extracting archive |
if | conditional processing in batch programs (files) |
ipconfig | IP address information |
joy.cpl | gaming devices |
label | creating, modifying, and deleting volume labels for disks |
lodctr | updating registry settings related to performance counters |
logman | managing the Alerts and Performance Logs service |
log off | session termination |
lpksetup | install or remove Windows interface languages |
lusrmgr.msc | local users and groups |
magnify | Launching the Magnifier app |
main.cpl | mouse properties |
makecab | archiving files to CAB archive |
md | creating a directory (folder) |
mdsched | checker random access memory for mistakes |
mkdir | create directory (folder) |
mmsys.cpl | sound properties |
mode | configuring system devices |
mofcomp | 32-bit compiler |
more | sequential output of data in parts of one screen |
mountvol | creating, viewing, and deleting connection points |
move | moving one or more files from one folder to another |
mrinfo | work with multicast messages |
mrt | launching the Malicious Software Removal Tool |
msconfig | system configuration |
msg | sending messages to the user |
msinfo32 | system information |
mspaint | launch graphic editor Paint |
msra | Windows Remote Assistance |
net | network resource management |
ncpa.cpl | network connections |
netstat | display of protocol statistics and current network connections TCP/IP |
netplwiz | user account management |
notepad | launching Notepad |
odbcconf | ODBC driver setup |
open files | list output open files and folders open in the system |
optional features | enable or disable Windows features |
osk | launching the on-screen keyboard |
path | print or set the search path for executable files |
pause | pause batch file execution, output a message |
perfmon | system monitor |
resmon | resource monitor |
popd | restoring the previous value of the current folder, saved by the pushd command |
prompt | changing the windows command line |
pushd | saving current directory and then changing directory |
ping | sending packets to the specified address |
power cfg | system power management |
printing a text file | |
qprocess | displaying process information |
qwinsta | display information about Remote Desktop Services sessions |
rd | deleting a directory |
recover | recovery of saved data on a damaged disk |
recdisc | creating a Windows recovery disk |
reg | registry command |
regedit | Registry Editor |
rem | placing a comment in a batch file or in a config.sys file |
ren | |
rename | renaming files and folders |
rmdir | deleting a directory |
replace | file replacement |
rstrui | restoring windows from system restore points |
runas | to use applications on behalf of another user |
rwinsta | resetting the values of subsystems of equipment and programs of the session to the initial state |
secpol.msc | local security policy |
services.msc | services |
set | listing, setting and removing Windows environment variables |
setlocal | start local environment changes in a batch file |
sc | display and configure services (background processes) |
sfc | checking the integrity of all protected system files and replacing the wrong ones |
sigverif | file signature verification |
shift | changing the contents of the overridden parameters for a batch file |
slui | Windows activation |
sndvol | volume mixer |
start | launch the specified program or command in a separate window |
schtasks | launching programs and executing commands on a PC according to a schedule |
sdbinst | compatibility database installer |
sort | sorting program |
subst | map a drive name to a specified path |
sysdm.cpl | properties of the system |
systeminfo | operating system configuration information |
taskkill | force termination of a process or application |
tasklist | show all tasks currently running, including services |
taskmgr | Task Manager |
tcmsetup | telephony client installation |
time | viewing and changing the current time |
timedate.cpl | time and date setting |
title | assigning the title of the current command line interpreter window |
tracert | trace route to the specified node |
tree | graphical display of the structure of a given drive or folder |
tscon | attaching a user session to a remote desktop session |
tsdiscon | disconnecting a Remote Desktop Services session |
tskill | process termination |
type | displaying the contents of text files |
typeperf | displaying performance information on the screen or in a log |
utilman | accessibility center |
ver | display information about the version of Windows |
verifier | driver check manager |
verify | setting Windows to check whether files are written to disk correctly |
vol | print volume label and serial number for disk |
vssadmin | command-line tool for administering volume shadow copy service |
w32tm | show current settings to display time zone |
winter | Windows version information on the screen |
wmic | information about the WMI toolkit in the interactive command shell |
write | wordpad text editor |
wscui.cpl | security and service center |
wusa | standalone update installer |
xcopy | copying files and folder tree |
Article Conclusions
The command line in the Windows operating system allows the user to control the computer without using a graphical interface. To perform certain actions on a PC, you must enter special commands into the command line interpreter. This article published a table with a list of the most popular commands for the Windows command line.
The Windows XP command line is a built-in Windows tool for solving a wide variety of tasks. Using the command line console, you can perform actions that are not possible in the Windows graphical environment. Set up the operating system. For most users, the command line window itself, and even more so working with it, causes some fear. But it's not really all that scary. Basic knowledge of the principle of operation, and some commands, can help restore the OS, set up scheduled tasks, and much more.
How to call the command line in Windows XP
There are quite a few ways to call the command line, but we will consider the most common ones:
- Through the menu Start" - where we choose " All programs", then click on the menu" Standard”, and here we already select the command line.
- The second way is to call the console through the built-in utility " Run» - here in the menu « Start»In the right column you can find this utility, run it and write the command in the dialog box cmd and click " OK».
- Another way to open the window " Run" and run the command line through it, this is a key combination Win+R .
There are other ways, but in most cases these three are enough, more than. Each user chooses one, more convenient and familiar way.
Settings and work with the command line
Before you get started, the command line can be customized for your convenience.
- To do this, you need to right-click on the top panel and select the item " Properties».
- Here we can make changes to the interface of the window itself - change the color and size of the font, change the font itself, adjust the location and size of the window for convenience. Change window color, background color, text color.
List of command line commands
Now the most interesting. There are a huge number of commands, of course, it is not necessary to know them all. But it is desirable to know the basic basic commands. And the first question is where to find them. And here the command line will help you, in which you need to register the command.
A list of commands will open, and there are a lot of them. You can view more detailed information about a particular command by typing in the console:
Help (space, command - for example, dir ) - the command will look like this - h elp dir
Here the case is unimportant, you can write in both small and large letters.
How to create a folder via command line
The possibilities of the command line are difficult to describe in one article, so we will limit ourselves to a couple of simple examples - how to create a folder or several folders at the same time, which, by the way, is impossible from the Windows graphical environment. And set up a scheduled task to turn off the computer. It is very important when, while watching a movie, you fall asleep and the computer remains on. In this case, you can set the time to turn off the PC and it will turn off according to the schedule.
So let's get started:
- Open the command line as described at the beginning of the article.
- First, let's pay attention to which directory we are in, in order to move to a specific folder, you need to write the full path to it, in our case it will be " Rdesktop” and the path to it will look like this:
cd c:\ Documents and Settings \ user \Desktop"
Note the command (cd
) is responsible for moving through directories, further, if in the addresspresentspaces, then allthe addressmust be enclosed in quotation marks.
Being in the directory, or rather, in the folder " Desktop» we can create multiple folders. Like this: - command ( md
) is responsible for creating the folder, but if after the command md
we will write several folder names, for example, these will be the names of the planets, then we will create exactly as many folders as we write them on the command line separated by a space.
An example of a command to create multiple folders:
m d Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune
And confirm your action with the key Enter
.
8 folders will appear on the desktop, with exactly the same names that we listed with a space after the command. Interesting, isn't it? To create the same number of folders in the usual way, we would need much more time and effort, creating each folder separately.
Turn off the computer
Now regarding the scheduled task - for example, we are listening to music in the Winamp player, and we want it to turn off at some point. The standard player can turn off both itself and the computer, but Winamp cannot do this, so it would be advisable to give it a scheduled task to shut down at a certain time. How it's done. Windows XP has a wonderful command. Time to indicate, of course, your own (in the example, the time is indicated randomly).
Or completely turn off the computer, another command is suitable for this:
shutdown.exe -s -t 3600
(numbers, mean seconds, after how many seconds the computer should turn off, in our case it is one hour or 3600 seconds).
To make it easier to work with commands and the command line, you can install the Notepad ++ program and write a command in it, and then save it with .cmd or .bat resolution. Then run this file. Then the computer will turn off exactly after the period of time that we set. You can cancel the scheduled task to turn off the computer with the command.
shutdown.exe -a
By the way, having created such a script, you can use it constantly without starting the command line.
The command line, also known as the console, came to us from MS-DOS. It allows you to control the operating system (OS) by entering commands in text form.
Most users do not know about the command line or know very little about it, while experts often ask to open it for remote technical support. Knowing the basics of working with the command line is also useful for self-correcting problems in the computer.
There are at least three ways to start the command line in the Windows operating system. One of the fastest is to simultaneously press the Windows key (with the Windows icon) and R on the keyboard. This will open the Run menu. It is enough to enter cmd , click the "OK" button. Please note that the command prompt will open with local user rights. If you need to open a command prompt with administrator rights, then use another method.
The second way is to open the search bar and enter cmd or “command prompt” into it, launch the command prompt by clicking on it with the mouse. If you want to run the command prompt as an administrator, right-click on it and select "Run as administrator". This method will work if you have Windows 7 or later. Users of earlier Windows versions to run command prompt as administrator, you need to find it in standard programs, right-click on command prompt and select "Run as administrator".
Teams
For the command line, there is a set of valid commands that must be entered following the syntax. To view a list of valid commands, type help and press Enter.
Let's look at commands that can be useful when setting up anonymization tools.
ping
This command allows you to determine if there is a connection to remote computer, as well as the data rate and loss percentage.
The remote computer that we will ping (we will define the connection parameters with it) can be specified by name (for example, yandex.ru) or ip (for example, 77.88.55.60)
ping yandex.ru
ping 77.88.55.60
tracert
This command is used to determine which servers are in the network path to the specified resource and the response time of each of them. For example, to determine the path to yandex.ru, enter tracert yandex.ru in the command line.
ipconfig /all
The command is intended for displaying the details of the current connection and managing DHCP and DNS client services, allows you to define configuration values.
route
The command provides access to the contents of the IP routing table. To view the functions, enter the command without parameters: route
To display on the screen: route print
To add a route to an endpoint: route add
For example, a default route with a default gateway address of 192.168.12.1: route add 0.0.0.0 mask 0.0.0.0 192.168.12.1
To add a permanent route, you need to add the -p parameter after the route, for example: route -p add 10.41.0.0 mask 255.255.0.0 10.27.0.1
Outcome
Now you know that the command line is not difficult at all. It allows you to access more information. Knowing just a few commands, you can answer almost any question from a technical support employee or apply the recommendations from the instructions yourself. Share useful information with your loved ones.