Linux vs Windows Commands
Most of us think that Linux has terminal and we can use a command-line interface only in Linux but it is just a myth. There is a PowerShell and a command prompt in windows as well where we may execute the commands easily. But Windows and Linux have commands with the same name as well.
| SNo. | Windows | Linux | Description |
|---|---|---|---|
| 1. | dir | ls -l | Directory listing |
| 2. | ren | mv | Rename a file |
| 3. | copy | cp | Copying a file |
| 4. | move | mv | Moving a file |
| 5. | cls | clear | Clear Screen |
| 6. | del | rm | Delete file |
| 7. | fc | diff | Compare contents of files |
| 8. | find | grep | Search for a string in a file |
| 9. | command /? | man command | Display the manual/help details of the command |
| 10. | chdir | pwd | Returns your current directory location |
| 11. | time | date | Displays the time |
| 12. | cd | cd | Change the current directory |
| 13. | md | mkdir | To create a new directory/folder |
| 14. | echo | echo | To print something on the screen |
| 15. | edit | vim(depends on editor) | To write in to files. |
| 16. | exit | exit | To leave the terminal/command window. |
| 17. | format | mke2fs or mformat | To format a drive/partition. |
| 18. | free | mem | To display free space. |
| 19. | rmdir | rm -rf/rmdir | To delete a directory. |
| 20. | taskkill | kill | To kill a task. |
| 21. | tasklist | ps x | To list running tasks. |
| 22. | set var=value | export var=value | To set environment variables. |
| 23. | attrib | chown/chmod | To change file permissions. |
| 24. | tracert | traceroute | To print the route packets trace to network host. |
| 25. | at | cron | daemon to execute scheduled commands. |
| 26. | type | cat | To print contents of a file. |
| 27. | ping | ping | To send ICMP ECHO_REQUEST to network hosts. |
| 28. | nslookup | nslookup | To query Internet name servers interactively. |
| 29. | chdisk | du -s | For disk usage. |
| 30. | tree | ls -R | To list directory recursively. |
Examples:
1. Listing Directories and files in the current folder/directory.
For Windows:

For Linux:

2. Renaming a file.
For Windows:

For Linux:

Recommended Posts:
- How to run Linux Commands on Windows 10?
- Linux Commands
- Fun Commands in Linux
- How to Build Your Own Commands in Linux?
- Internal and External Commands in Linux
- Custom commands for linux terminal
- Essential Linux/Unix Commands
- Interesting Funny Commands in Linux
- Daily life Linux Commands
- Basic Shell Commands in Linux
- Basic Linux Commands for day to day life
- How to Access All Users in Linux Using Different Commands?
- List out all the Shells Using Linux Commands
- halt, poweroff and reboot Commands in Linux
- Useful and time saving bash commands in Linux
- Network configuration and trouble shooting commands in Linux
- Difference between Linux and Windows
- Important Linux Commands (leave, diff, cal, ncal, locate and ln)
- Uninstall Linux completely from a PC with Windows
- How to Install Linux on Windows PowerShell Subsystem?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


