次の方法で共有


Using Xterm as terminal for PowerShell on Linux

You could have not missed the information that we open sourced PowerShell and that it is available on Linux. I wanted to start playing with PowerShell on Linux but did not wanted to install a complete Linux OS so I installed PowerShell for Linux on Linux on Windows Subsystem for Linux.

Let’s start with installing PowerShell for Linux on Bash for Windows first.

Installation

Open Bash on Windows and run the following commands.

 
[sourcecode language='bash'  padlinenumbers='true']
sudo apt-get install libunwind8 libicu52
wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb

You can now run PowerShell within Bash on Windows.

image

But the experience of running PowerShell commands within the Bash on Windows console is not optimal.  See this github issue. https://github.com/PowerShell/PowerShell/issues/1829

But you can install an x server on Windows and then install the xterm terminal to improve your PowerShell experience.

Install XMing server

Check this video on Channel 9 on how to install Xming

Now you have installed Xming server you can connect to XMing from within Bash for Windows.

Start XMing and check if XMing is running

image

Open Bash on Windows if you have not started it yet and type:

 
[sourcecode language='bash' ]
export DISPLAY=localhost:0.0

Install xterm in Bash on Windows.

 
[sourcecode language='bash' ]
sudo apt-get install xterm

Now you can start xterm and start exploring PowerShell on Linux.

image

 

Have fun!