Try the evaluation version of Bash on Ubuntu on Windows
table of contents
Hello.
I'm Mandai, in charge of Wild on the development team.
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 about it, so I was wondering what it would be like, but I was told that you can try Bash under development by installing the preview version of Windows 10, so I tried it right away and would like to report on it. think.
Set the environment where the preview version will be installed
In a normal Windows 10 environment, you will have to wait until the official version is installed, so
experience Bash on Ubuntu on Windows quickly with LAVIE Hybrid ZERO | Refer to the Digital Lifestyle Department article and complete the procedures to join the Windows Insider Preview program. .
When I made the detailed settings, I completely trusted the information on the link and it went well.
In fact, it said that it would take several days for the latest version of the developer preview to be announced, but
I was surprised to receive an update notification to the latest version of the developer preview the next day.
After restarting several times, the installation was successfully completed.
Please enter a UNIX user name
When I decided to start bash, I pressed the Windows key and typed "bash", and the words "Bash on Ubuntu on Windows" appeared!
When you start it up, you'll see a console screen that looks no different from a command prompt.
However, the Japanese environment was only half-baked, and I couldn't make out what was written because the characters were so garbled that I had trouble reading "Please enter a UNIX user name."
In conclusion,
If you type root, you can log in without a password!
That's what it means. Well, it's a preview version.
Let's go without worrying about the details.
Windows C drive is mounted under /mnt/c
The directory structure seems a little weird.
If /mnt/c is the C drive, where on earth is / located? I think it's a valid question, but it's a preview version.
Even though I am root, I am a super user who cannot access anything below Documents and Settings (Permission denied).
If the file name is Japanese, ls will cut it off in the middle.
In general, support for multibyte characters seems to be unimplemented.
The df command is not working well and I cannot confirm.
The kernel is not Linux, so I guess it can't be helped.
It will be quite convenient if you can see various things around here.
When I hit ps, almost no processes are running.
Do not expect task manager-like functionality from the ps command.
It seems that the Bash environment and Windows environment are managed completely separately.
How far can you actually go?
So, I installed some software to see how well it can be used at this stage.
ssh
Access to remote hosts possible. Authentication using a key also worked without problems.
sed
Installed by default. It works fine.
awk
Installed by default. It works fine.
vi
Installed by default. It works fine.
top
Installed by default. It works, but I can't get any information other than the PID.
grep
Installed by default. It works fine.
wget
Installed by default. It works fine.
curl
Installed by default. It works fine.
Please note that communications other than HTTP such as FTP have not been tested.
ping
Installed by default.
The message "ping icmp open socket: Socket type not supported" appears and I cannot send a ping.
netstat
Installed by default. It works fine.
However, nothing is displayed, probably because socket communication is not possible.
shell script
bash and dash are available.
By the way, since it is a port from ubuntu, /bin/sh is a symbolic link to /bin/dash. (This area is the same as Ubuntu)
apache
I was able to install it, but it doesn't work.
Unable to start due to an error that the socket could not be created properly.
PHP
apt-get install php5
Can be installed with.
Since php5-curl etc. can be installed from apt-get, it seems that command line tools will work without problems.
Try sending an email from the console
Since the mail command is not installed, install it using the following command.
apt-get install mailutils
However, the mail command does not work properly.
mysql
It can be installed with the following command.
apt-get install mysql-server
Move! (That too normally)
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'm surprised that curl and wget work normally, but considering that software can be installed using apt-get, I wonder if TCP/IP communication is possible.
However, I was surprised that I couldn't use the ping command.
It became clear to me that I didn't really understand how the commands I used casually worked.
I was shocked to see that MySQL was working normally.
However, there is an error when starting MySQL server, so you may not expect it to work perfectly.
The data remained even after stopping → starting, and even when the PC was turned off, the data remained, so it seems to be working.
At this rate, I feel like tools that link PHP and MySQL will work from the console.
However, the socket file written in my.cnf has not been generated, and looking at netstat, there is no evidence that port 3306 is being grabbed.
There are a lot of error logs, so I can guess that the operation is quite unstable.
What you can do now
A quick batch process check? No, we are not in an environment where we can test it yet. It has become possible to use SSH without cygwin or git bash.
I think that using bash on Ubuntu on Windows from an MSP's standpoint is to be able to perform confirmation work in the same way as Linux for monitoring purposes, but it is difficult to evaluate as it is not even possible at present, but it is a big deal. I think it's a step.
If it works well, it will likely completely change the way Windows is monitored.
That's it.