Run kali linux on windows

How to Install Kali Linux in Windows Subsystem for Linux (WSL)

Step 1: Enable WSL in Windows 10

To enable WSL in Windows 10, open PowerShell as an administrator and run the following command:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Step 2: Install WSL

To install WSL, open a new PowerShell window as an administrator and run the following command:

Step 3: Set WSL 2 as Default

To set WSL 2 as the default version of WSL, open PowerShell as an administrator and run the following command:

wsl --set-default-version 2

Step 4: Install Kali Linux

To install Kali Linux, run the following command in a PowerShell window:

wsl --install -d kali-linux

Step 5: Install Kali Linux Desktop Environment (Optional)

To install the Kali Linux desktop environment (XFCE), run the following command:

sudo apt install kali-win-kex -y

Or u can use, kali-tweaks to install as per ur requirement.

Step 6: Start Kali Linux Desktop Environment (Optional)

To start the Kali Linux desktop environment (XFCE), run the following command:

Step 7: Install Zsh Shell (Optional)

To install the Zsh shell, run the following command:

Step 8: Set Zsh as the Default Shell (Optional)

To set Zsh as the default shell, run the following command:

Step 8: If you have the space, why not install “Kali with the lot”? (Optional)

Here, run the following command:

sudo apt install -y kali-linux-large

That’s it! You should now have Kali Linux installed in WSL with optional GUI and Zsh shell support. Your computer has now become a lethal weapon! 💣🚀💥

Are you interested in running Kali Linux with a graphical user interface on your Windows 11 computer without having to use a virtual machine or VMware? If so, you’re in luck because with WSL 2 & WSLg, you can install Kali Linux 2023 on Windows 11 easily and for free.

In this post, I’m going to show you how to install Kali Linux 2023 with a desktop environment on Windows 11 using WSL.

What is WSL2?

WSL2 stands for Windows Subsystem for Linux version 2. It’s essentially a Linux environment with a kernel compiled by Microsoft that’s optimized for Linux distros. This means you can run Ubuntu, Kali Linux, OpenSUSE, and more inside Windows 11 as part of the application.

With the help of WSLg, you can even run Linux GUI apps and desktop environments inside Windows 11. Compared to VirtualBox or VMware, WSL2 is much faster and quicker.

System Requirements

Before we start, please ensure that your computer meets the following requirements:

  • You’re running the latest version of Windows 11.
  • Your computer supports hardware virtualization, which is enabled by default on modern computers. If it’s disabled, make sure to enable it from the BIOS.

WSL Setup

To set up WSL, follow these steps:

  • Open Windows PowerShell or Command Prompt as administrator.
  • Type the command wsl --install and press Enter. This command will download and install a WSL2 kernel, GUI support, and the Ubuntu image automatically.
  • Restart your computer.
  • After rebooting, you’ll see a command prompt busy wrapping up the Linux installation. You can go ahead and set up a username and password for Ubuntu.
  • If you notice, Ubuntu is available as an app on Windows 11 and can be accessed from the Start menu.

Installing Kali Linux 2023

To install Kali Linux 2023, follow these steps:

  • Open Windows PowerShell or Command Prompt as administrator.
  • Type the command wsl -l -v to list out the installed Linux distributions.
  • Type the command wsl --list --online to see the available Linux distributions. You’ll see Kali Linux, which is available to install.
  • To install Kali Linux, type the command wsl --install -d kali-linux. This will download and install Kali Linux 2023 on Windows 11.
  • After that, you will enter into Kali Shell Environment. Go head and update the repository list by typing: sudo apt update
  • If you want to install the full edition of Kali, which includes many useful tools, type the command sudo apt install kali-linux-large. Please ensure you have at least 20GB of free space left on your drive before running this command.

Basic WSL Commands

Here are some basic WSL commands you can use:

  • Type exit to get out of the Linux shell and go back to the Windows PowerShell or Command Prompt.
  • To see the list of installed distributions, type wsl --list.
  • To change the default distribution to Kali Linux, type wsl --set-default kali-linux.
  • To see the running status of Linux distributions, type wsl -l -v.
  • To shut down the lightweight virtual machine, type wsl --shutdown.

Installing XFCE Desktop

To install the XFCE desktop environment for Kali Linux, follow these steps:

  • Open Kali Linux Terminal by typing “wsl” on Windows PowerShell or Command Prompt, or run Kali Linux from the Start menu.
  • Update the repositories of Kali Linux by typing sudo apt update.
  • Install the XFCE desktop environment by typing sudo apt install kali-win-kex. This will download and install XFCE for Kali Linux.
  • Type kex --win -s and press Enter to connect to the VNC server.
  • Set a password and choose whether to set a view-only password.

NOTE: To exit the VNC server, press F8 to bring up the context menu and select “Disconnect from the server“. If you want to run Linux GUI apps on Windows 11, follow these steps:

Running Linux GUI Apps

If you want to run Linux GUI apps on Windows 11, follow these steps:

  • Open the Kali Linux Terminal.
  • Install an app like Blender by typing the command sudo apt install blender
  • Now, you can run Linux GUI apps like Blender within Windows 11.

Conclusion

Congratulations! You’ve successfully installed Kali Linux 2023 with a graphical user interface on Windows 11 using WSL.

Feel free to leave your thoughts and comments below. If you want to learn more about WSL usage, you can run the command wsl --help.

Sign Up for Our Newsletters

Don’t miss any updates.

By checking this box, you confirm that you have read and are agreeing to our terms of use regarding the storage of the data submitted through this form.

Время на прочтение2 мин

Количество просмотров81K

image

 
С введением подсистемы Windows для Linux (WSL) в Windows 10 появились новые возможности, такие как поддержка Linux дистрибутивов, в частности Ubuntu. В этой статье я расскажу, как с помощью этой подсистемы подключить Kali LInux в Windows среде не используя системы виртуализации.

Хотя работы Kali на Windows может быть не оптимальна из-за различных ограничений, все еще существует множество ситуаций, когда Kali Linux может быть необходим для использования совместно с Windows 10. Например это может быть консолидация рабочих областей, особенно если Windows является вашей основной рабочей средой. Также может быть полезна стандартизация инструментов и сценариев для работы в нескольких средах, быстрый перенос инструментов командной строки для тестирования проникновения в Linux для Windows и т. д.

Для того, чтобы установить Kali необходимо выполнить несколько шагов. В первую очередь необходимо включить и установить Windows Subsystem for Linux Command Reference — запустить powershell оболочку с правами администратора, выполнить команду и перезагрузить вашу машину:

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

После перезагрузки необходимо установить Ubuntu-environment:

lxrun /install

Далее вам необходимо установить WSL Distribution Switcher. Эта программа предназначена для переключения подсистемы Linux для использования различных дистрибутивов Linux. Образы rootfs в настоящее время загружаются из репозиториев Docker Hub в виде исходников или prebuilt-сборок.

(Для клонирования проекта с git-репозитория необходимо установить git-клиент на Windows 10, например отсюда: https://git-scm.com/download/win, а также установить python для Windows).

git clone https://github.com/RoliSoft/WSL-Distribution-Switcher.git
cd WSL-Distribution-Switcher
python get-prebuilt.py kalilinux/kali-linux-docker
python install.py rootfs_kalilinux_kali-linux-docker_latest.tar.gz
lxrun /setdefaultuser root

Теперь, когда Kali-environment развернут на вашей Windows 10 вы можете вызвать его с помощью команды:

bash

Далее вам необходимо обновить Kali Linux и установить кириллическую локализацию (при необходимости):

export LANG=C
apt-get update && apt-get dist-upgrade

После развертывания Kali-environment мы можем установить необходимые утилиты и использовать их из Windows:


Таким простым способом вы получите современный дистрибутив для тестирования на проникновение в вашей Windows среде без запуска систем виртуализации, перезагрузок и прочего. Также, необходимо учесть, что из такой среды у вас не будут нормально работать утилиты по работе с железом, для вардрайвинга и т.д.

Running Kali Linux on Windows 11

Running Kali Linux on Windows 11 is easier than you might think. By using the Windows Subsystem for Linux (WSL), you can install and run Kali Linux without needing a separate PC or complicated setup. In a few simple steps, you’ll have a powerful tool for penetration testing and security research right on your Windows machine.

In this section, you’ll learn how to set up and run Kali Linux on your Windows 11 computer using WSL. Follow these steps to get started.

Step 1: Enable Windows Subsystem for Linux

First, open PowerShell as an administrator and run the command: wsl --install.

Enabling WSL is crucial because it allows you to run Linux distributions directly on Windows without setting up a virtual machine. This command sets up everything you need, including the virtual machine platform and the Windows Subsystem for Linux.

Step 2: Install a Linux Distribution

Next, go to the Microsoft Store, search for «Kali Linux,» and click «Get» to install it.

This step involves downloading and installing Kali Linux from the Microsoft Store. It may take a few minutes, depending on your internet speed.

Step 3: Set Up Kali Linux

After installation, open Kali Linux from the Start menu. Follow the on-screen instructions to set up your username and password.

Once you have Kali Linux installed, you need to configure it. This involves setting up a new user account, which helps keep your data secure.

Step 4: Update and Upgrade Kali Linux

Run the commands: sudo apt update and sudo apt upgrade to ensure your Kali Linux is up-to-date.

Updating and upgrading your system is crucial for security and performance. These commands will fetch and install the latest updates and patches for Kali Linux.

Step 5: Install Additional Tools

Use the command: sudo apt install to install any additional tools you might need.

Kali Linux comes with many pre-installed tools, but you might need more depending on your tasks. Installing additional tools is straightforward and can be done via the terminal.

After completing these steps, you’ll have a fully functional Kali Linux environment running on your Windows 11 machine. You can use Kali Linux just like you would on a dedicated machine.

Tips for Running Kali Linux on Windows 11

  • Always keep your system updated: Regular updates ensure you have the latest security patches.
  • Use strong passwords: This is crucial for securing your Linux environment.
  • Back up your data: Regular backups prevent data loss in case of system failures.
  • Familiarize yourself with basic Linux commands: Knowing basic commands can make your experience much more enjoyable.
  • Use a VPN for added security: This helps protect your internet traffic while using Kali Linux for penetration testing.

Frequently Asked Questions about Running Kali Linux on Windows 11

Can I run graphical applications in Kali Linux on WSL?

Yes, you can run graphical applications by installing an X server like VcXsrv.

Is it safe to run Kali Linux on Windows 11?

Yes, it is safe as long as you follow proper security practices like updating your system and using strong passwords.

Do I need a powerful computer to run Kali Linux on Windows 11?

Not necessarily. WSL is optimized for performance, but more RAM and a good CPU will improve your experience.

Can I use Kali Linux for regular computing tasks?

While you can, Kali Linux is specifically designed for penetration testing and security research, so it might not be ideal for everyday use.

Do I need any special permissions to install WSL?

You will need administrative privileges to install and enable WSL on your Windows 11 machine.

Summary

  1. Enable Windows Subsystem for Linux
  2. Install a Linux Distribution
  3. Set Up Kali Linux
  4. Update and Upgrade Kali Linux
  5. Install Additional Tools

Conclusion

Running Kali Linux on Windows 11 opens up a world of possibilities for those interested in penetration testing and cybersecurity. With the Windows Subsystem for Linux, you can easily set up Kali Linux without needing a second machine or complex virtual environments. This guide has walked you through the steps necessary to get Kali Linux up and running, providing you with a powerful toolset right on your Windows 11 PC.

Remember, keeping your system updated and securing your data with strong passwords are essential practices. If you’re new to Linux, take some time to familiarize yourself with basic commands and concepts; it’ll make your journey much smoother.

For further reading, consider looking into more advanced WSL usage and exploring the myriad of tools that Kali Linux offers. Now that you’ve got the basics down, the sky’s the limit. Happy hacking!

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.

His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.

Уже некоторое время в Windows 10 присутствует возможность установить различные дистрибутивы Linux с помощью компонента «Подсистема Windows для Linux» или WSL, однако лишь в виде терминала без графического интерфейса. Начиная с Windows 10 2004 WSL обновился до версии 2.0, благодаря чему появились новые возможности и, в рамках этих возможностей появилась Kali Linux для WSL2 с поддержкой графического интерфейса или Win-Kex.

В этой инструкции подробно об установке графического интерфейса Kali Linux в Windows 10 версии 2004 или новее, а также дополнительная информация, например, о том, как включить русский язык интерфейса в установленной системе.

Установка Kali Linux с графическим интерфейсом в Windows 10

Порядок установки Kali Linux с графическим интерфейсом (GUI) для подсистемы Windows для Linux будет состоять из следующих шагов (напоминаю: необходима версия Windows 10 2004 или новее):

  1. Включите компонент «Подсистема Windows для Linux». Сделать это можно в Панель управления — Программы и компоненты — Включение или отключение компонентов Windows. После установки перезагрузите компьютер.
    Установка подсистемы Windows для Linux

  2. Этот шаг можно пропустить, если у вас включены компоненты Hyper-V, иначе запустите Windows PowerShell от имени администратора (можно сделать через правый клик по кнопке «Пуск» и выполните команду
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. Скачайте и установите обновление ядра Linux WSL2 со страницы https://docs.microsoft.com/ru-ru/windows/wsl/wsl2-kernel
  4. Перезагрузите компьютер, запустите PowerShell от имени администратора и выполните команду
    wsl --set-default-version 2
  5. Зайдите в магазин приложений Windows Store, используйте поиск чтобы найти и установить Kali Linux.
    Установка Kali Linux из Windows Store

  6. После завершения установки в PowerShell от имени администратора выполните команду:
    wsl --set-version kali-linux 2
  7. Запустите Kali Linux (пункт будет доступен в меню «Пуск»), выполните первоначальную настройку (имя пользователя и пароль), после чего по порядку выполните следующие команды (требуется подключение к Интернету, последний шаг может занять много времени.
    sudo apt update
    sudo apt dist-upgrade
    sudo apt install -y kali-win-kex
  8. В ходе выполнения последней команды вам будет предложено выбрать клавиатуру. Я оставил значения по умолчанию, но, возможно, стоило выбрать русскую, так как в дальнейшем при включении русского языка интерфейса в ряде случаев кириллица не отрисовывается (не знаю, есть ли связь, лишь предположение).
  9. По завершении установки введите команду kex для запуска Kali Linux с графическим интерфейсом. При первом запуске вам будет предложено создать отдельный пароль, можно от этого отказаться.
Kali Linux с графическим интерфейсом в Windows 10

В результате запустится Kali Linux с графическим интерфейсом в полноэкранном режиме. Для выхода из полноэкранного режима можете вызвать меню клавишей F8 и отключить опцию «Full Screen».

Если вам потребуется включить русский язык интерфейса для Kali Linux, у меня сработал следующий метод:

  1. В графическом интерфейсе Kali Linux запускаем терминал, вводим команду
    sudo dpkg-reconfigure locales
  2. Выбираем ru_RU UTF-8 на двух экранах (отметку ставим пробелом, переключаемся на кнопку Ok клавишей Tab).
  3. Закрываем окно терминала и окно графического интерфейса, в терминале из которого мы запускали графический интерфейс вводим kex stop (если приглашение ввода не отображается, попробуйте изменить размер окна — у меня встретился такой баг).
  4. Снова запускаем kex — в результате интерфейс будет на русском языке.
    Kali Linux WSL2 на русском языке

А в целом, хотя я еще и не придумал, для чего мне это использовать (возможно, попробую запускать пакеты от bitnami для экспериментов с сайтами), но на первый взгляд всё работает исправно и быстро: быстрее, чем в виртуальной машине.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Максимальная длина названия файла windows 10
  • Windows 10 домашняя для одного языка добавить локального пользователя
  • Windows forms си шарп
  • Как выключить зависший ноутбук с помощью клавиатуры на windows 10
  • Idt 92hd87b2 4 windows 10