The Wayback Machine - https://web.archive.org/web/20241123014153/https://www.geeksforgeeks.org/linux-vs-windows-commands/
Open In App

Linux vs Windows Commands

Last Updated : 17 May, 2020
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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:

Listing-Directories-and-files-in-the-current-folder

For Linux:

Listing-Directories-and-files-in-the-current-folder1

2. Renaming a file.

For Windows:

Renaming-a-file

For Linux:

Renaming-a-file1



Previous Article
Next Article

Similar Reads

How to run Linux Commands on Windows 10?
It is a dilemma when you want to switch from one operating system to another. This is a common case when you switch from Windows to Linux. Either you store your data and then uninstall Windows to install Linux and then transfer your data or you can have a dual boot system where you encounter an option as to which OS to choose in the beginning. Don'
2 min read
How to Use Linux Commands in Windows with Cygwin
Cygwin is a collection of tools that provide a Linux Operating System's terminal look, feel, and some of its basic functionality for users of Windows OS who want to have a go over the basic commands of Linux without worrying about installing a Linux OS. To use this tool, first of all, we need to download Cygwin setup depending on the version of Win
3 min read
Basic CentOS Linux Commands in linux
CentOS is a free and open-source operating system that aims to provide a stable reliable, and community-supported platform for servers and other enterprise applications. In this article, we will be covering CentOS Linux basics commands and functions of CentOS and also we will look into the advanced commands. These CentOS commands allow you to manag
3 min read
Internal and External Commands in Linux
The UNIX system is command-based i.e things happen because of the commands that you key in. All UNIX commands are seldom more than four characters long. They are grouped into two categories: Internal Commands : Commands which are built into the shell. For all the shell built-in commands, execution of the same is fast in the sense that the shell doe
4 min read
Useful and time saving bash commands in Linux
There are many useful bash scripts that can make things easier. Many things can be done just using the terminal. Here is a list of some of such useful bash scripts through which we can do things that cannot be done manually. 1. Counting the number of files(or directory) in a given directory: Go to the directory in which you want to count the number
3 min read
Process Control Commands in Unix/Linux
Process control commands in Unix are: bg - put suspended process into background fg - bring process into foreground jobs - list processes bg Command : bg is a process control command that resumes suspended process while keeping them running in the background. User can run a job in the background by adding a "&" symbol at the end of the command.
3 min read
Basic Shell Commands in Linux
A shell is a special user program that provides an interface to the user to use operating system services. Shell accepts human-readable commands from the user and converts them into something which the kernel can understand. It is a command language interpreter that executes commands read from input devices such as keyboards or from files. The shel
3 min read
Interesting Funny Commands in Linux
This entire article is all about showing off cool commands executable in the Linux terminal. This article is aimed at being a one-stop destination for all cool or you can say interesting funny commands in Linux to play. 1. The Matrix Effect: We all can agree on one thing that the falling down text effect from "The Matrix" movie is one of the best s
5 min read
How to Build Your Own Commands in Linux?
Linux is one of the most widely used open-source operating systems which supports both GUI as well as CLI. It has been widely used all over the world since its first distribution launched on September 17, 1991, by Linus Torvalds. It is widely known for its command-line operations. We have been using several commands in Linux like date command, mkdi
6 min read
List out all the Shells Using Linux Commands
There are various methods to list all the shells which are installed in our Linux system. A Shell is a software program that acts as an interface between the user and the operating system(OS). It can also be thought of as a command interpreter that is used to execute another program. Method 1: Using cat command Example: cat /etc/shells Explanation:
1 min read
Most Useful Commands to Manage Apache Web Server in Linux
Prerequisite: How do Web Servers work? Apache is one of the most widely used free, open-source Web Server applications in the world, mostly used in Unix-like operating systems but can also be used in windows. As a developer or system administrator, it will be very helpful for you to know about the Apache webserver. It has many notable features amon
3 min read
How to Monitor Linux Commands Executed by System Users in Real-time?
If you are a Linux system administrator then you would definitely want to monitor the interactive activity of all system users, like monitoring the Linux commands they execute in real-time. In this brief Linux system security article, we will be going to discuss how to monitor all Linux shell commands executed by system users in real-time. Let's se
1 min read
7 Linux Commands For Managing Users
Linux is a fantastic platform that allows multi-user access options. Different users can access the same Linux OS for working simultaneously. A user account allows multiple people to access directories, terminals, the Internet, etc. There are three types of user accounts: User Account: This account is for general use with limited permissions.System
3 min read
Useful Commands For Filtering Text for Effective File Operations in Linux
In this article, let us learn about different commands used in Linux for filtering text to implement effective file operations on Linux Machines. What is a filter in Linux? In Linux Operating System, Filters act as a specialized program to get desired output from the client/user by taking the help of other files and pipes to perform a series of ope
7 min read
How to execute commands remotely using SSH in Linux?
Many times users need to work in remote systems. For which they have to log in to the remote server, execute certain commands and come out of that session. Is it possible to perform all these actions locally? Yes, it's possible using ssh client. In this article, we will see different ways of running remote commands locally using ssh. Pre-requisite
2 min read
How to Run Multiple Commands on Multiple Linux Servers
In this article, we'll learn how to run multiple commands on multiple Linux servers. It was a manual task completed by System Administrators. Let's say, they made some changes to a server and if they need to make the same changes to many servers they would need to log into each server and repeatedly make changes to each of them. But we can run mult
3 min read
List All Available Commands and Aliases in Linux
There might be sometimes a need to list all the commands and aliases supported by the current system. As we already know, an alias is a custom shortcut that references a command. It can be very useful to replace long commands with a small alternative command. While a command is a program that we can run in the terminal to produce some output or cha
3 min read
The “Argument List Too Long” Error in Linux Commands
There are times when we encounter directories that contain a large number of files, if we try to perform certain operations on those particular directories we may get the error Argument List Too Long. In this article, we will see the cause of this error and how to resolve this error. We have created a directory(temp) with a large number of files (
4 min read
YUM Commands for Linux Package Management
If you are a Linux user or system administrator, chances are you've come across YUM (Yellowdog Updater, Modified) at some point in your journey. YUM is a powerful package management tool that simplifies the process of installing, updating, and managing software on Red Hat-based Linux distributions like CentOS and Fedora. In this article, we will de
4 min read
Executing Linux Commands Without Storing Them in History
In Linux, a lot of work is done via the command line or terminal. However, sometimes we might run a command that might contain some sensitive information or we just do not want to clutter our history file with unnecessary commands. In such cases, we want to execute Linux commands without keeping them in memory. There are multiple ways to achieve th
6 min read
10 Useful firewall-cmd Commands in Linux
"Firewall-cmd" is a command-line tool used to manage firewalld, a dynamic firewall management tool found in many Linux distributions, such as Fedora, Red Hat, and CentOS. When it comes to managing firewall rules, Firewalld is more user-friendly and dynamic than the previous IPtables system. Administrators can configure the firewall by adding or rem
7 min read
Using the eval command in Linux to run variables as commands
In Linux, the eval command serves as a powerful tool, enabling users to execute commands stored within variables. This functionality proves particularly useful for scripting and automation, allowing dynamic generation and execution of commands during runtime. By employing, users can manipulate and run strings as if they were direct commands, offeri
4 min read
Daily life Linux Commands
Clear the Terminal : In our daily life, we use to work on Terminal if we are using LINUX. Continuous working on terminal makes the terminal screen full of commands and for removing them and making our screen totally free of character, we often use clear command. Key combination ‘Ctrl+l‘ has the same effect as ‘clear‘ command. So from next time use
6 min read
Important Linux Commands (leave, diff, cal, ncal, locate and ln)
Linux provides some important tricks. Here are a few and important one's: leave — remind you when you have to leave Syntax: leave +hhmm leave waits until the specified time (within the next 12 hours), then reminds you that you have to leave by writing to the TTY that you executed leave on. You are reminded 5 minutes and 1 minute before the actual t
2 min read
Linux System Monitoring Commands and Tools
Monitoring the performance and health of a Linux system is essential for maintaining its stability and optimizing resource utilization. Linux provides a variety of commands and tools to facilitate system monitoring, enabling administrators to track key metrics, identify potential issues, and ensure efficient operation. Linux offers a robust set of
5 min read
10 Linux Commands to Collect System and Hardware Information
In the world of computers, where it's crucial to be accurate and understand things well, Linux is like a helpful guide. It's an operating system that's open for everyone to use, giving a strong and safe space for your computer activities. What's cool is that Linux comes with special commands that help you understand more about your computer's insid
4 min read
15 Most Useful Host Scanning Commands – Kali Linux
Scanning and identifying live hosts on a network is one of the crucial activities for an ethical hacker or expert. One of the powerful tools in Kali Linux, a popular penetration testing distribution, is Nmap which has a variety of host scanning techniques. To gather valuable information about targets, detect vulnerabilities, and ultimately secure s
9 min read
Linux Network Commands Cheat Sheet
Linux is a very popular operating system. Many people use it. Developers and network admins need to know Linux network commands well. This article will going explains most of the common Linux network commands in a very easy way and It also has a cheat sheet about these commands. The cheat sheet tells you what each command does and how you use it. L
9 min read
How to Access All Users in Linux Using Different Commands?
Linux allows multiple users with their own custom setting and configuration to work together on the same system, even at the same time. It can even allow a particular user to access several sessions from different locations in order to work on the system. Below is a list of different commands to access the list of users in Linux: 1. less command: E
2 min read
Linux Commands Cheat Sheet
Linux, often associated with being a complex operating system primarily used by developers, may not necessarily fit that description entirely. While it can initially appear challenging for beginners, once you immerse yourself in the Linux world, you may find it difficult to return to your previous Windows systems. The power of Linux commands in con
13 min read
three90RightbarBannerImg