Try out the evaluation version of Bash on Ubuntu on Windows

table of contents
Hello.
I'm Mandai, the Wild team member in charge of development.
Personally, I think the biggest topic this summer is Bash support in Windows 10, but what do you think?
Since it was announced at Build 2016, there hasn't been much information, so I was wondering what to expect. However, I found out that you can try out the currently developing Bash by installing the preview version of Windows 10, so I decided to give it a try and would like to report on it
Set up the environment where the preview version will be installed
In a typical Windows 10 environment, you would have to wait until the official version is installed, so
"Experience Bash on Ubuntu on Windows early on LAVIE Hybrid ZERO | Digital Life Department"to join the Windows Insider Preview program.
I trusted the information in the linked article completely for detailed settings, and it worked fine.
It actually said that it would take several days for the latest developer preview to be announced, but
I was surprised to receive an update notification for the latest developer preview the very next day.
After rebooting a few times, the installation was completed successfully
I'm having trouble with "Please enter a UNIX user name"
So, I decided to launch bash, and when I pressed the Windows key and typed "bash," the words "Bash on Ubuntu on Windows" appeared!
When I launched it, a console screen appeared that was no different from the command prompt.
However, the Japanese environment was incomplete, and the characters were garbled and I couldn't understand what was written, so I had trouble with the notation ``Please enter a UNIX user name.''
In conclusion
If you type root you can log in without a password!
That's what it was. Well, it's just a preview version, after all.
Let's not worry about the details.
The Windows C drive is mounted under /mnt/c
The directory structure is rather unsettling.
If /mnt/c is on the C drive, then where exactly is / located? That's a valid question, but it is a preview version after all.
Although I am root, I act like a superuser and cannot access the Documents and Settings area (Permission denied)
When I run ls on a file with a Japanese file name, it gets cut off halfway through
Generally speaking, it seems that support for multibyte characters is not yet implemented.
The `df` command doesn't work properly,
so I can't verify it. I suppose this is unavoidable since the kernel isn't Linux.
It would be quite convenient if this kind of thing could be made visible.
When I type ps, there are almost no processes running
Don't expect the `ps` command to have the same functionality as a task manager.
It seems that the Bash environment and the Windows environment are managed completely separately.
How far can you actually go?
So, I installed some software to see how useful it is at this stage
ssh
The remote host is accessible, and key-based authentication works without any issues
sed
It's installed by default and works fine
awk
It's installed by default and works fine
vi
It's installed by default and works fine
top
It is installed by default and works, but no information other than the PID is available
grep
It's installed by default and works fine
wget
It's installed by default and works fine
curl
It's installed by default and works without problems.
However, please note that non-HTTP communications such as FTP have not been tested.
ping
It's installed by default.
However, I can't send a ping because it displays the message "ping icmp open socket: Socket type not supported".
netstat
It's installed by default and works without problems.
However, nothing is displayed, possibly due to a lack of socket communication.
Shell script
Bash and dash are provided.
Incidentally, since it's a port from Ubuntu, `/bin/sh` is a symbolic link to `/bin/dash`. (This is the same as in Ubuntu.)
Apache
The installation was successful, but it doesn't work.
It fails to start due to an error related to the socket not being created correctly.
PHP
apt-get install php5
It can be installed via apt-get.
Since php5-curl and other command-line tools can also be installed via apt-get, it seems like they should work without any problems.
Sending an email from the console
If the mail command is not installed, install it using the following command
apt-get install mailutils
However, the mail command doesn't work
mysql
It can be installed with the following command
apt-get install mysql-server
It moves! (Normally too)
However, the following error is displayed:
/etc/init.d/mysql start df: Warning: cannot read table of mounted file systems: No such file or directory /lib/lsb/init-functions.d/50-ubuntu-logging: line 5: 46 Aborted (core dumped) plymouth --ping > /dev/null 2>&1 * Starting MySQL database server mysqld /lib/lsb/init-functions.d/50-ubuntu-logging: line 5: 485 Aborted (core dumped) plymouth --ping > /dev/null 2>&1 [ OK ] * Checking for tables which need an upgrade, are corrupt or were not closed cleanly.
summary
I was surprised that curl and wget worked normally, but considering that I could install software with apt-get, I guess TCP/IP communication is at a level where it's possible.
However, I was surprised that the ping command didn't work.
It revealed that I don't really understand how the commands I use casually every day actually work.
I was surprised that MySQL was running normally.
However, there's an error when starting the MySQL server, so I can't expect it to work perfectly.
The data remained even after stopping and starting it, and it also remained after turning off the PC, so it seems to be working to some extent.
At this rate, I think tools that link PHP and MySQL from the console should work.
However, the socket files specified in my.cnf are not being generated, and netstat shows no indication that port 3306 is being used.
There are also a lot of error logs, so I can guess that the operation is quite unstable.
What you can do now
Checking simple batch processing? No, we don't even have a test environment yet. At best, we can now use SSH without needing Cygwin or Git Bash.
From an MSP perspective, using bash on Ubuntu on Windows would be useful for monitoring purposes, allowing us to perform verification tasks in the same way as on Linux, but even that isn't possible yet, so it's difficult to evaluate, but I think it's a big step.
If it works properly, it could completely change how we monitor Windows.
That's all
0





