From 5e09f3636f10e9808adb00ec21ea2e3ff668b05a Mon Sep 17 00:00:00 2001 From: Ryen Tang Date: Wed, 3 Oct 2018 10:39:00 +1300 Subject: [PATCH 1/3] Updated Kali Linux Installation and Uninstallation Updated the Installation and Uninstallation Bash commands for Kali Linux distro to address the issue #2901. Tested the steps in Kali Linux on Windows Subsystem for Linux (WSL) on the following version: ```sh $ sudo cat /etc/os-release PRETTY_NAME="Kali GNU/Linux Rolling" NAME="Kali GNU/Linux" ID=kali VERSION="2018.3" VERSION_ID="2018.3" ID_LIKE=debian ANSI_COLOR="1;31" HOME_URL="https://www.kali.org/" SUPPORT_URL="https://forums.kali.org/" BUG_REPORT_URL="https://bugs.kali.org/" ``` ```sh $ pwsh PowerShell 6.1.0 Copyright (c) Microsoft Corporation. All rights reserved. https://aka.ms/pscore6-docs Type 'help' to get help. PS /> $PSVersionTable Name Value ---- ----- PSVersion 6.1.0 PSEdition Core GitCommitId 6.1.0 OS Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 Platform Unix PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0 PS /> Get-Content -Path /etc/os-release PRETTY_NAME="Kali GNU/Linux Rolling" NAME="Kali GNU/Linux" ID=kali VERSION="2018.3" VERSION_ID="2018.3" ID_LIKE=debian ANSI_COLOR="1;31" HOME_URL="https://www.kali.org/" SUPPORT_URL="https://forums.kali.org/" BUG_REPORT_URL="https://bugs.kali.org/" ``` --- .../Installing-PowerShell-Core-on-Linux.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md b/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md index b591ddfc5349..1ab635044a40 100644 --- a/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md +++ b/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md @@ -586,12 +586,18 @@ sudo snap remove powershell-preview ```sh # Download & Install prerequisites -sudo apt-get install libunwind8 libicu55 -wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb -sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb +wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-9_amd64.deb +dpkg -i libicu57_57.1-9_amd64.deb +apt-get install -y curl gnupg apt-transport-https -# Install PowerShell -sudo dpkg -i powershell_6.1.0-1.ubuntu.16.04_amd64.deb +# Add Microsoft public repository key to APT +curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - + +# Add Microsoft package repository to the source list +echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" | tee /etc/apt/sources.list.d/powershell.list + +# Install PowerShell package +apt-get install -y powershell # Start PowerShell pwsh @@ -600,7 +606,8 @@ pwsh ### Uninstallation - Kali ```sh -sudo dpkg -r powershell_6.0.2-1.ubuntu.16.04_amd64.deb +# Uninstall PowerShell package +apt-get remove -y powershell ``` ## Raspbian From c7a35384a8b840f7dc2c5e958604b3e70cf47f38 Mon Sep 17 00:00:00 2001 From: Ryen Tang Date: Wed, 3 Oct 2018 11:11:10 +1300 Subject: [PATCH 2/3] Included apt-get update Added `apt-get update` to update packages list before `apt-get install` --- .../setup/Installing-PowerShell-Core-on-Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md b/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md index 1ab635044a40..e4ea7be3a100 100644 --- a/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md +++ b/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md @@ -588,7 +588,7 @@ sudo snap remove powershell-preview # Download & Install prerequisites wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-9_amd64.deb dpkg -i libicu57_57.1-9_amd64.deb -apt-get install -y curl gnupg apt-transport-https +apt-get update && apt-get install -y curl gnupg apt-transport-https # Add Microsoft public repository key to APT curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - @@ -597,7 +597,7 @@ curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" | tee /etc/apt/sources.list.d/powershell.list # Install PowerShell package -apt-get install -y powershell +apt-get update && apt-get install -y powershell # Start PowerShell pwsh From 63f1b0da2a73e8c85cfef9e72590985a4f547c45 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 3 Oct 2018 11:26:57 -0700 Subject: [PATCH 3/3] Removed note for Kali install --- .../setup/Installing-PowerShell-Core-on-Linux.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md b/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md index e4ea7be3a100..e8b9845c7db3 100644 --- a/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md +++ b/reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md @@ -579,9 +579,6 @@ sudo snap remove powershell-preview ## Kali -> [!NOTE] -> Kali support is not currently working. Please use the [Snap package][snap] instead. - ### Installation ```sh