[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

Try the evaluation version of Bash on Ubuntu on Windows

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.

insider_preview_version

 

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."

bash_01

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.

ps_aux

 

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.

bash_2

 

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.

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.

apache2_start

 

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.

mysql_start

 

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.

If you found this article helpful , please give it a like!
0
Loading...
0 votes, average: 0.00 / 10
315
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

The person who wrote this article

About the author

Yoichi Bandai

My main job is developing web APIs for social games, but I'm also fortunate to be able to do a lot of other work, including marketing.
Furthermore, my portrait rights in Beyond are treated as CC0 by him.