• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » How To Use Windows 10 PowerShell To Access Ubuntu Bash

By Abhishek Ghosh August 26, 2018 1:04 am Updated on August 26, 2018

How To Use Windows 10 PowerShell To Access Ubuntu Bash

Advertisement

Our previous guide on How To Run Bash Scripts on Windows 10 Via Git Bash To Launch Linux GUI App has some basic lack of features which Windows PowerShell provides. Like, from Windows PowerShell, we can navigate to Windows files, directories with notation of Windows, we can open Windows Registry Editor etc. Additionally, not all will want to install Git Bash as extra software on system. Here Are The Steps of How To Use Windows 10 PowerShell To Access Ubuntu Bash And Avoid Opening Ubuntu Application’s Bash. This guide does not need installation of application outside distributed by Microsoft. PowerShell ISE has lot of themes on GitHub and also tweaking options present. We are using plain PowerShell for just demonstration of basics.

How To Use Windows 10 PowerShell To Access Ubuntu Bash

 

Steps To Use Windows 10 PowerShell To Access Ubuntu Bash

 

The screenshot’s Ubuntu bash is configured as we have described in our earlier guides like How to Install Powerline Fonts, Symbols for Bash on Windows 10. Essentially it is ZSH, somewhat like iTerm2 on Mac.

This guide will need to install Windows 10 SSH Client. Windows 10 also offers an OpenSSH server. We do not need server part for this guide. The SSH client is now a part of Windows 10 as an optional feature. To install it, navigate to Settings from start menu. Then go to Apps, and click Manage optional features (under Apps & Features). Then click the Add a feature click menu button option at the top of the list of installed features. Your system may already have the SSH client installed, in that case it will appear in the list here. Otherwise, find OpenSSH Client option by scrolling down, and click Install.

Advertisement

---

Next, open Ubuntu Bash on Windows 10. Open sshd_config config file, before that take backup :

Vim
1
2
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup
sudo nano /etc/ssh/sshd_config

and make it like this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Package generated configuration file
# See the sshd_config(5) manpage for details
 
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation no
 
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024
 
# Logging
SyslogFacility AUTH
LogLevel INFO
 
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
AllowUsers root
StrictModes yes
 
RSAAuthentication no
PubkeyAuthentication no
#AuthorizedKeysFile     %h/.ssh/authorized_keys
 
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
 
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
 
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
 
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes
 
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
 
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
 
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
 
#MaxStartups 10:30:60
#Banner /etc/issue.net
 
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
 
Subsystem sftp /usr/lib/openssh/sftp-server
 
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

Save the file. Now add a password to your Ubuntu Bash by typing :

Vim
1
passwd

Now, restart SSH daemon on Ubuntu Bash :

Vim
1
sudo service ssh --full-restart

After it restarts, you can close that Ubuntu Bash. Open Windows PowerShell and run :

Vim
1
ssh root@127.0.0.1

This will login you to your Windows’s Ubuntu Bash. You can configure and set PowerLine font on PowerShell (right click on top corner of PowerShell window to get menu options, then click properties). After login to Ubuntu bash, you can run Ubuntu’s commands like :

Vim
1
apt update -y

Of course, you can directly SSH to your server from Windows PowerShell without the need of Ubuntu Bash.

Tagged With how to access bash for powershell , ubuntu using powershell , use bash on powershell , ubuntu bash windows 10 customize , open ubuntu in powershell , windows 10 bash ubuntu power shell , powershell windows 10 ubuntu , how to use powershell like bash in windows , how to use bash in powershell , how to configure ubuntu using powershell

This Article Has Been Shared 678 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How To Use Windows 10 PowerShell To Access Ubuntu Bash

  • Run Bash Scripts on Windows 10 Via Git Bash To Launch Linux GUI App

    Run Bash Scripts on Windows 10 Via Git Bash. Git Bash Offers Integrity Options With Windows 10 Bash Making it Easy to Work on Both Windows & unix System.

  • Will you use cracked Windows 7?

    Know why using a cracked version of Microsoft Windows 7 is dangerous

  • Which one to buy:Factory installed (OEM) or Retail (Box pack) Windows 7

    This article demystifies the terms: OEM Windows 7 and Retail Windows 7 and it is a good guide to help the new customers to decide which one to buy: OEM Windows 7 or Retail Windows 7

  • What are keyloggers, trojans and Backdoors?

    Here is a small article explaining the terms Keyloggers, Trojans and Backdoors to an average Microsoft Windows user.

  • Should You Install iTunes for Windows?

    Should You Install iTunes for Windows as Music Player to Test Drive? iTunes is a Typical Mac and iPhone Application For the Music Lovers as Default Music Player.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023
  • Advantages of Cloud Server Over Dedicated Server for Hosting WordPress March 26, 2023
  • Get Audiophile-Grade Music on Your Smartphone March 25, 2023
  • Simple Windows Security and Privacy Checklist for 2023 March 24, 2023
  • 7 Best Artificial Intelligence (AI) Software March 24, 2023

About This Article

Cite this article as: Abhishek Ghosh, "How To Use Windows 10 PowerShell To Access Ubuntu Bash," in The Customize Windows, August 26, 2018, March 28, 2023, https://thecustomizewindows.com/2018/08/how-to-use-windows-10-powershell-to-access-ubuntu-bash/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT