Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to develop in Linux-Like Shell (bash) on Windows?

I'm Windows user. But according to my project requirements, I need to write Linux Shell Script(Bash shell). How to develop Linux Shell on Windows?

Is there any IDE for writing Linux Shell Scripting? Please share me some ideas and resource links.

like image 753
Sai Ye Yan Naing Aye Avatar asked Sep 06 '12 05:09

Sai Ye Yan Naing Aye


People also ask

Can you use a Bash shell on Windows?

Bash on Windows is a new feature added to Windows 10. Microsoft has teamed up with Canonical, aka the creators of Ubuntu Linux, to build this new infrastructure within Windows called the Windows Subsystem for Linux (WSL). It allows developers to access a complete set of Ubuntu CLI and utilities.

How do I practice Bash on Windows?

Go to Control Panel -> Programs and Features -> Turn Windows Features On and Off. In the window that appears, check the 'Windows Subsystem for Linux' option, and click OK. This will trigger an alert asking for the system to be restarted to complete the installation of the required components.


1 Answers

You have quite a number of options:

cygwin

Install cygwin. It will give you a bash.

mingw

The minimal GNU for windows. Comes with set of commands, compilers. This came with my Git on Windows and now the default shell for small scripts

VM, such as VirtualBox

There are tons on VMs, VirtualBox being easy to use(it powers the Boot2Docker). You can do development and test on real Linux distros.

Ubuntu on Windows 10

There is new kid on the block. This allows you to run User Space Ubuntu using Windows Subsystem for Linux (WSL). see more on it at Microsoft blog

Other notes/IDE support

Shell scripts should be small, requires less IDE etc. I use VIM with syntax highligthing. But it seems ShellED may be useful in your case. I got the link from answer for this question - Bash script plugin for Eclipse?

IntelliJ has couple of plugins too for Bash..

like image 200
Jayan Avatar answered Sep 20 '22 11:09

Jayan