Is Cmd Prompt the same as Ubuntu Terminal? - windows

I'm sorry if this is a simple question:
I want to swap from ubuntu to windows for my web dev (personal preference). I'm used to using the terminal in ubuntu and the commands there and I was wondering whether the command prompt in windows is the same? Do the commands do the same?
If not, is there a way to get a terminal for windows the same as ubuntu?

No the Command prompt is not same as the Linux shell you may find some commands resembling to those of the shell in Linux (terminal) however to get a more Linux shell like environment you can install cygwin or GOW (Gnu on Windows). It will give you a bash.
You can find Cygwin here . and
You can find GOW here .

Its not the same, as others have answered, but since the latest version of windows 10 there is a way of running linux bash terminal in Windows.
Have a look in Bash on Windows.
It is actually running Ubuntu inside your Windows.

Windows is based on DOS but Ubuntu is based on Linux. Each of those has its own commands, with some similar commands. I personally prefer Linux commands as they are easier to understand and more simple than DOS commands. You can't use Linux commands in DOS nor the reverse.

Related

Alternatives to cmd.exe for Windows Subsystem for Linux

I started using Linux Subsystem for Windows, and it is Rad! But, it is running in a terminal which behaves like cmd.exe (yuk!). This carries with it everything I hate aobut cmd. e.g., copy & paste, window sizing, etc.
I don't know how in 2018, Microsoft has allowed this to still exist.
Here are some alternatives:
Alternative Windows shells, besides CMD.EXE?
How do I run Ubuntu, Linux Subsystem for Windows in an alternative command prompt?
Windows cmd is really poor compared to the gnome-terminal or any other *nix-based terminals. Gets really messed up with Linux fonts. Try hyper terminal.
https://medium.com/#ssharizal/hyper-js-oh-my-zsh-as-ubuntu-on-windows-wsl-terminal-8bf577cdbd97

How would I interface with the Linux terminal (bash for windows) using windows command prompt?

I just recently found out about using bash in windows. I had alot of fun installing linux programs onto my windows computer using bash and wondered how I would be able to run an automatic script so I dont have to export my display everytime I open bash.
I used to write scripts for cmd called batch scripting and I would be able to do everything cmd could do. Now that I have access to bash, I want to script a program that connects useful pieces of cmd with useful pieces of bash but I Can't find any results telling me how to call bash commands from cmd. Thank you - Zak Kaioken

Windows/Cygwin equivalents of linux screen and $()?

I have a bash script that runs screen and uses $( command ) to execute the output of command. I need to port this script to run on Windows. I installed Cygwin to run this but it doesn't recognize screen as a command and I don't know the Windows equivalent of linux's $(). Any suggestions on how to do this in windows?
screen is not installed by default.
You need to explicitly install it using cygwin setup.
https://cygwin.com/faq.html#faq.setup.what-packages
$( command ) it is available in bash on Cygwin like on Linux

Is it not possible to use Windows Bash as shell in Emacs for ssh etc?

I tried but get error: Process shell exited abnormally with code 255.
Mainly want this for SSH, and avoid Cygwin or plink/Putty.
I have this in config:
(setq explicit-shell-file-name "C:\\Windows\\System32\\bash.exe")
(setq explicit-bash.exe-args '("--noediting" "--login" "-i"))
(setenv "SHELL" shell-file-name)
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
Thank you
I use Bash for Windows with the latest Windows Creator's Update and Ubuntu 16.04 they have included. It runs quite well on Visual Studio Code and Cmder (a shell app like MobaXTerm etc). I also use ZSH instead of Bash (with oh-my-zsh and powerline9k) but i had some adjustments to do (and, it takes time to load, but i've read somewhere that Microsoft is working to fix this slow issue).
To be honest, it's a good way to replace Putty, but it has to grow a little. There's a lot of network tools that can't work on WSL for example.
I know the pain to prepare a Cygwin or use Putty, but you can take a look on MobaXterm, a really good ssh client that includes a package manager to allow you to do a lot of things from your Windows. I don't know if they use Cygwin like in the past ... But it's a ready-to-use solution with local bash shell.
To finish this and maybe help you, here is my startup line to run WSL / Bash for Windows in Cmder: bash -l -i -cur_console:p -c zsh. If you need any more information just ask :).

How can I run Windows 10's bash for Emacs mingw32 for Windows?

I would like to use the recent bash shell of Windows 10 in shell mode of Emacs (mingw32) for Windows. Could anyone advise how could I do that?
You can use one of the other terminal mode: term or ansi-term by typing M-x term or M-x ansi-term.
When being invoked, these terminals will ask for the path to your shell. Here you just need to put the correct path to the Windows shell.

Resources