Skip to content

Updated Kali Linux Installation and Uninstallation #2973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 3, 2018
Merged

Updated Kali Linux Installation and Uninstallation #2973

merged 3 commits into from
Oct 3, 2018

Conversation

kiazhi
Copy link
Contributor

@kiazhi kiazhi commented Oct 2, 2018

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:

$ 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/"
$ 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/"

Version(s) of document impacted

  • Impacts 6.next document
  • Impacts 6 document
  • Impacts 5.1 document
  • Impacts 5.0 document
  • Impacts 4.0 document
  • Impacts 3.0 document

Reason(s) for not updating all version of documents

  • The documented feature was introduced in version (6.x or higher) of PowerShell
  • This issue only shows up in version (6.x or higher) of the document
  • This PR partially fixes the issue, and issue # tracks the remaining work

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/"
```
@TravisEz13
Copy link
Member

Did you verify that invoke-webrequest works to an https url after your changes?

@zjalexander
Copy link
Contributor

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md ✅Succeeded View (powershell-3.0)
View (powershell-4.0)
View (powershell-5.0)
View (powershell-5.1)
View (powershell-6)

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to run apt-get update before this command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, before line 591. I will fix that.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to run apt-get update before you can install from the new repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, true. Forgot to include that to update the package list. Good catch.

@kiazhi
Copy link
Contributor Author

kiazhi commented Oct 2, 2018

Did you verify that invoke-webrequest works to an https url after your changes?

Since libssl1.0.x or higher is installed, it does work.

$ sudo apt search libssl1.*
Sorting... Done
Full Text Search... Done
libssl1.0-dev/kali-rolling 1.0.2o-1 amd64
  Secure Sockets Layer toolkit - development files

libssl1.0.2/kali-rolling,now 1.0.2o-1 amd64 [installed,automatic]
  Secure Sockets Layer toolkit - shared libraries

libssl1.1/kali-rolling,now 1.1.0h-4 amd64 [installed]
  Secure Sockets Layer toolkit - shared libraries

Test result using Invoke-WebRequest to download powershell package from github releases through HTTPS below. Unless I'm missing something that you may want me to test against? You can give me the commands to run and I will post it back here.

PS /> Invoke-WebRequest -Uri "https://github.com/PowerShell/PowerShell/releases/download/v6.1.0/powershell-6.1.0-linux-x64.tar.gz" -OutFile ~/powershell-6.1.0-linux-x64.tar.gz
PS /> Get-ChildItem -Path /home/ryentang/powershell-6.1.0-linux-x64.tar.gz


    Directory: /home/ryentang


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
------          10/3/18  10:55 AM       58271981 powershell-6.1.0-linux-x64.tar.gz


PS /> exit

$ ls -l /home/ryentang/
total 56960
-rw-rw-rw- ryentang ryentang 58271981 Oct  3 10:55 powershell-6.1.0-linux-x64.tar.gz

Added `apt-get update` to update packages list before `apt-get install`
@TravisEz13
Copy link
Member

BTW, I asked you about libssl before I checked it my self. This is my basic test to verify that it's working correctly. If you get correctly formed json back it's working.

 '(Invoke-WebRequest -Uri "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json").Content'

@zjalexander
Copy link
Contributor

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md ✅Succeeded View (powershell-3.0)
View (powershell-4.0)
View (powershell-5.0)
View (powershell-5.1)
View (powershell-6)

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@kiazhi
Copy link
Contributor Author

kiazhi commented Oct 2, 2018

BTW, I asked you about libssl before I checked it my self. This is my basic test to verify that it's working correctly. If you get correctly formed json back it's working.

 '(Invoke-WebRequest -Uri "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json").Content'

@TravisEz13, confirmed it is working.

Result Output below.

$ 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/"
$ pwsh
PowerShell 6.1.0
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.
PS /> (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json").Content
{
  "StableReleaseTag": "v6.1.0",
  "PreviewReleaseTag": "v6.1.0-rc.1",
  "ServicingReleaseTag": "v6.0.4",
  "ReleaseTag": "v6.1.0",
  "NextReleaseTag": "v6.1.0-rc.1"
}

@sdwheeler
Copy link
Contributor

@TravisEz13 @kiazhi - This article still says:

Note
Kali support is not currently working. Please use the Snap package instead.

Does that still apply?

@sdwheeler sdwheeler added the do-not-merge Tag - closed without merging label Oct 3, 2018
@TravisEz13
Copy link
Member

No, It can be removed. I verified the changes.

@sdwheeler sdwheeler removed the do-not-merge Tag - closed without merging label Oct 3, 2018
@zjalexander
Copy link
Contributor

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/setup/Installing-PowerShell-Core-on-Linux.md ✅Succeeded View (powershell-3.0)
View (powershell-4.0)
View (powershell-5.0)
View (powershell-5.1)
View (powershell-6)

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@sdwheeler sdwheeler merged commit e3cc714 into MicrosoftDocs:staging Oct 3, 2018
@kiazhi kiazhi deleted the patch-1 branch October 4, 2018 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants