Tag: shell

Azure Cloud Shell

Microsoft Azure Cloud Shell

Today at the Microsoft Build Conference, Microsoft announced the Azure Cloud Shell. The Azure Cloud Shell is a browser-based shell experience to manage and develop Azure resources.

Azure Cloud Shell offers a browser-accessible, pre-configured shell experience for managing Azure resources without the overhead of installing, versioning, and maintaining a machine yourself. Today it gives you a variety of different tools directly from your web browser in the Azure Portal.

This gives Azure Administrators an easy admin environment to manage resources as well as third-party applications. In the background Microsoft runs thousands of isolated containers, ready for you to use. Microsoft takes care of keeping this container up to date, so you can focus on your administrator tasks. The usage is free, the only thing you will need to pay, are the storage cost for your container and the things you store on the Azure File Share.

Linux shell interpreter

  • Bash
  • sh

Azure tools

  • Azure CLI 2.0 and 1.0

Text editors

  • vim
  • nano
  • emacs

Source control

  • git

Build tools

  • make
  • maven
  • npm
  • pip

Containers

  • Docker
  • Kubectl
  • DC/OS CLI

Databases

  • MySQL client
  • PostgreSql client
  • sqlcmd Utility

Other

  • iPython Client

It also looks like PowerShell will be available later, hopefully it will arrive soon. Microsoft also announced Azure PowerShell 3.0. If you want to learn, check out my blog post: Mastering Azure with Cloud Shell



Bash on Windows 10

How to Install Linux Bash on Windows 10

With the Windows 10 Anniversary Update, which was released by Microsoft in Summer 2016, Microsoft included a Windows Subsystem for Linux in Windows 10. This allows you to enable Linux Bash on Windows 10. In this blog post I quickly want to show how you can enable the Windows Subsystem for Linux on Windows 10. This is great if you want to use some Linux tools on your Windows 10 machine. I use it for example to use SSH to connect to Linux Virtual Machines on Azure.

First you have the following requirements:

  • Windows 10 Anniversary Update – Windows 10 Build 14393 and higher
  • 64-bit versions of Windows 10
  • Internet Connection to download the Windows Subsystem for Linux in Windows
  • Active Developer Mode in Windows 10

First enable Developer Mode There are two option you can do this

Open the Settings App, go to Update & Security, go to For developers and enable Developer mode:

Windows 10 - Developer Mode

You can also use the following PowerShell command to enable Developer Mode:

 
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

After this you can enable the Windows Subsystem for Linux as a Windows Feature in the Control Panel or PowerShell

Windows 10 - Windows Subsystem for Linux

Run the following PowerShell command to enable the Windows Subsystem for Linux:

Enable Windows Subsystem for Linux using PowerShell

 
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

After that you will need to restart your computer.

Now you can open up PowerShell or the command prompt and start using bash. (You can also start Bash directly from the Start Menu)

Bash on Windows 10

Hope this helps you to get started.

 



Cheatsheet: Using Diskpart on a Server Core installation #4

Using Diskpart on a Server Core installation. Disk Administration or Partition a disk.

Create a new partition and format a partition

SELECT DISK 0
CREATE PARTITION PRIMARY
ASSIGN LETTER=E
SELECT PARTITION 1
FORMAT FS=NTFS LABEL="New Volume" QUICK
EXIT

Commands you may then issue at the DISKPART prompt:

LIST Disk
LIST Partition
LIST Volume

SELECT Disk n
SELECT Volume n
SELECT Partition n

DETAIL Disk
DETAIL Partition
DETAIL volume

HELP
REM (remark/comment)
EXIT

Commands to Manage Basic Disks:

(set the current in-focus partition to be the system partition)

ASSIGN (allocate the next free drive letter)
ASSIGN LETTER=l (Choose a free letter)

CREATE PARTITION Primary Size=50000 (50 GB)
CREATE PARTITION Extended Size=25000
CREATE PARTITION logical Size=25000

DELETE Partition

EXTEND Size=10000

REMOVE letter=l (Remove drive letter l from the in-focus partition)
REMOVE /ALL (Remove ALL current drive letters and mount points)

Commands to Manage Dynamic Disks:

(set the current in-focus partition to be the system partition)

ASSIGN (allocate the next free drive letter)
ASSIGN LETTER=l (Choose a free letter)

ADD disk=n (Add a mirror to the in-focus SIMPLE volume on the specified disk.)

BREAK disk=n (Break the current in-focus mirror)

CREATE VOLUME Simple Size=n Disk=n
CREATE VOLUME Stripe Size=n Disk=n,n,...
CREATE VOLUME Raid Size=n Disk=n,n,...

DELETE DISK
DELETE PARTITION
DELETE VOLUME

EXTEND disk=n [Size=n]
IMPORT
ONLINE

REMOVE letter=l (Remove drive letter l from the in-focus volume)
REMOVE /ALL (Remove ALL current drive letters and mount points)
RETAIN

Commands to Convert Disks:

CONVERT mbr
CONVERT gpt
CONVERT dynamic
CONVERT basic

CLEAN ALL (remove all partition and volume info from the hard drive)
RESCAN