5

Do shell and command prompt refer to the same things, i.e command line for Windows and shell for *NIX OS? Or is there is something else to know too?

Actually I'm using MySQL using the command prompt and was following some tutorials on that and they are using "shell" so I thought to ask. I've googled it and some are referring to them as the same, others aren't, so I'd like a more specific answer from coders.

2
  • They are both terms that have many different meanings, some of which overlap with each other. Commented Aug 13, 2012 at 5:02
  • @Random832 yes actually i am looking for the difference if exists as most answers says they are same ..but just let me know if any difference exists :) Commented Aug 13, 2012 at 5:04

3 Answers 3

4

cmd.exe and the variety of UN*X shells are all command-line shells. They all allow you to execute commands.

All support:

  • some form of input/output redirection from/to commands
  • some form of piping
  • setting environment variables
  • a set of programmatic constructs, e.g. loops and if/else

And all can be scripted, executing shell commands from a file.

However, the cmd.exe shell is pretty primitive compared to it's UN*X counterparts. The UN*X shells typically support e.g. more complex string manipulation, and the set of system commands available on UN*X machines makes for a richer programming experience.

The mysql program is also a command-line shell, only one that is specific to interacting with a MySQL server using mainly SQL commands.

As has been pointed out, the term shell can be more generally used to refer to a tool that provides access to the services of a system, for instance a desktop user interface including a task bar, application switcher, etc. cf. the wikipedia article for Shell (computing)

Sign up to request clarification or add additional context in comments.

2 Comments

I just installed mysql 8.0; bundled together with a MySQL Command Line Client and a MySQL Shell; both are CLI interfaces, can you spell out the difference between the two. Much apprecitations in advance.
Hi @SumanthLazarus unfortunately I don't have a lot of experience with both tools, so I won;t be able to help. Sorry
3

Generally, shell is not a command-line interface, but an environment providing access to system functionality. In Windows, the explorer.exe (process providing the taskbar, start menu, hotkeys) should be considered shell, not cmd.exe.

Unix shells are traditionally CLI-based, but graphic shells also exist.

2 Comments

I have a hard time accepting the Windows Explorer as a 'shell'. It lacks the programmability that I think is key to being shell-like. Even the Windows cmd.exe has some programmability; I don't see that in Windows Explorer.
@JonathanLeffler: Alan's usage is common. See the Wikipedia article, for example.
0

Yes, command prompt is the Windows term for the Unix shell.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.