0

Does Ubuntu's standard terminal have the same functions as Windows' cmd.exe, or does it do different tasks?

By that, I mean e.g. whether I can move files or unmount USB devices in both? I know they have different syntaxes.

Would you open Ubuntu's terminal for the same things you would open cmd.exe on Windows or are there common different use cases?

  • So you ask for a manual to Windows cmd? It is off topic here, isn't it? I guess you know that you can move files and mount devices in linux ;-) – Pilot6 Jun 6 '15 at 15:14
  • Cmd is very limited, it can do almost same as DOS could. – Pilot6 Jun 6 '15 at 16:04
  • As shown by that last erroneous statement, Ask Ubuntu is not the place for information about command interpreters in Windows. You'd be best off sticking to asking about Ubuntu here. – JdeBP Jun 6 '15 at 16:25
  • 3
    No, you do not. A question about Terminal does not read "I'm asking if cmd does ..." or "would you open cmd for ..." or "if you were on Windows ...". – JdeBP Jun 6 '15 at 17:29
  • 1
    Good question and on-topic IMHO and excellent answer. Both upvoted! I don't understand the downvotes: OP is just asking about similarities/differences between OSes... – Fabby Jun 7 '15 at 14:00
18

cmd.exe is a shell. Bash is a shell. They both interpret and run command-line input in similar (ish) ways, both allow you to run things, and both can interpret scripts based on their relative syntaxes, but those syntaxes is fairly different.

PowerShell is another terminal interpreter from Microsoft. It's a lot more like Bash in terms of native capability albeit with an even wilder syntax.

In general, Windows' emphasis has been on providing graphical access to things. A lot of functionality isn't natively exposed by command line commands. What is has was mostly copied over from MSDOS so everyday things like moving files around is simple enough, but unmounting can take extra applications. I suspect you can do anything with enough searching and installing.

In other words, if I found primed nuclear device and the only interface to diffuse it was a cmd.exe command line, we'd probably all die. I'd take my chances with tar.

  • Okay, thanks. I wondered if the powers of Terminal were more than that or Cmd. How would you suggest I improve the question? – Tim Jun 6 '15 at 14:49
  • 5
    It's not clear what you expect the answer to be. I know that sounds silly but do you mean explictly "Can cmd run the same commands as Bash?" or do you mean (as I've answered) a more vague "Can you do everything in cmd you can in Bash?" Either way, I'm not entirely sold on the utility of such a question. What are you trying to do? – Oli Jun 6 '15 at 15:00
  • I was simply interested what the difference was between them. – Tim Jun 6 '15 at 15:06
  • 1
    Bash Guide for Beginners and Advanced Bash-Scripting Guide might be something to look into - at least the latter is very thorough (I have not peeked into the first). You find them here. My opinion/experience: bash is a lot more than cmd.exe - in the state they are "delivered". Install cygwin (www.cygwin.com) on a Windows machine to get a very good bash. – Hannu Jun 6 '15 at 17:25
  • 1
    It should also be noted, that neither Bash nor cmd.exe are actually able to perform low-level system tasks like volume (un-)mounting. They can only take commands with the effect to start (arbitrary) external programs, which in turn may be able to perform such tasks. – David Foerster Jun 7 '15 at 19:31
4

cmd and terminal are similar in giving a user a text based interface (obviously) and access to certain lower-level utilities for troubleshooting or configuring the systems.

For instance, in my university every time a computer does not seem to allow a user to log in, what does the admin do? Open cmd , and ping the host. That would be the same with terminal.

How would you kill a process that is taking too much memory? In terminal pkill firefox , and in cmd taskkill firefox.exe.

The shell scripting on linux is similar to batch scripting on windows. Here's grep equivalent on windows. There used to be a command-line text editor running under cmd.exe , called edit but it has been discontinued since windows 7 64 bit version.

So in that respect , yes, you would open cmd and terminal for the same purposes.

The difference however, is that the linux terminal can take on many more tasks, and it's much more flexible. Even moderate level users can do some simple things in terminal whereas cmd.exe on Windows is more of an admin exclusivity...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.