<img align="right" alt="Mechanical Engineering" width="400" src="https://user-images.githubusercontent.com/81384987/206849634-955fcda0-a46b-4624-a5ad-fa4ffa1eef43.png"> 

# kali-all-commands

<br>

- 🔭 I'm currently working on [**my web-site**](https://akashdip2001.github.io/linktree/)

<br>
<br>
<a href="https://www.youtube.com/c/akash aot" target="blank"><img align="center" src="https://user-images.githubusercontent.com/81384987/209952974-0163b04e-ccae-4be5-844a-075ef85c43d2.png" alt="akash aot" height="30" width="40" />  My YouTube Channel</a>
<br>
<br>

---

| ✅ [linux-basics-course](https://github.com/akashdip2001/linux-basics-course) |
| --- |

---

## 📋 Index

| # | Topic |
|---|-------|
| 1 | [Add Kali Repository](#add-kali-repositirie) |
| 2 | [No Sound on Kali](#no-sound-on-kali) |
| 3 | [Fix Broken Installation](#any-previous-installation-not-successfully-completed) |
| 4 | [WIFI Connect but Not Working](#wifi-connect-but-not-working) |
| 5 | [Turn ON Bluetooth](#turn-on-bluetooth) |
| 6 | [Install Software in KALI](#install-softwers-in-kali-linux----) |
| 7 | [Snap Install](#snap-install) |
| 8 | [Uninstall Software](#uninstall----) |
| 9 | [Force STOP Running Program](#force-stop-any-running-program) |
| 10 | [All Important Software Table](#all-imp-softwers-in-kali-and-all-tools) |
| 11 | [Delete File](#delet-file----) |
| 12 | [Install Wine](#install-wine----windows-emulator-for-linux) |
| 13 | [WSL 2 — Kali in Windows](#wsl-2--kali-in-windows) |
| ↳ | [13.1 Setup](#wsl-2--kali-in-windows) |
| ↳ | [13.2 Reset WSL Password](#132-reset-wsl-password) |
| ↳ | [13.3 Desktop Environment](#133-install-desktop-environment) |

---
---

# Add Kali Repositirie
<h3> jast copy & past the code into your Terminal - Done ✔️  </h3>

```
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" | sudo tee /etc/apt/sources.list
```

[`offical Website`](https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/)

---
# No sound on Kali
```
sudo apt purge --autoremove pipewire-pulse
```
[`offical Website`](https://www.kali.org/docs/troubleshooting/no-sound/)

---
# Any previous installation not successfully completed
```
apt --fix-broken install
```

---

# WIFI Connect but Not working 
```
sudo systemctl status systemd-resolved.service 
sudo systemctl restart systemd-resolved.service (only this )
sudo systemctl status systemd-resolved.service 
```
---
# Turn ON Bluetooth
```
service bluetooth restart
```
---
# Install Softwers in KALI Linux ---
```
sudo dpkg -i *.deb                ( normal .deb file install command )
./configure  ---  make install    ( install Python in Kali command )
```       
       
[**How to install all type of softwers in KALI linux**](https://youtu.be/fDod27oOZCM)      

---
<h3>Snap Install</h3>

```
sudo su
sudo apt update
sudo apt install snapd
apt update
apt install snapd
systemctl enable --now snapd apparmor
```

Snap install but not Working ---
```
systemctl enable --now snapd.apparmor
```         
[**How to install Snap Store in KALI linux**](https://youtu.be/P_qg4ujwypE)

---

# Uninstall  --- 
```
dpkg --list
sudo apt remove gimp
sudo apt --purge remove gimp
sudo apt-get autoremove
sudo apt purge --auto-remove gimp
sudo apt clean
```
---
# force STOP any running Program
```
pidof [appname]
kill -9 [number]
```
---
# All imp. Softwers in KALI and all [Tools](https://www.kali.org/tools/all-tools/)

| Name  |    Work       |  normal Code  | snap Code | flathub Code |
|-----|-------------|---------------|---------------|---------------|
|~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| | |FIRST_ADD_KALI_REPOSITORY [`link`](https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/) | FIRST_ISTALL_SNAP_THEN_USE_IT [`link`](https://snapcraft.io/docs/installing-snapd) | FIRST_SETUP_FLATHUB [`link`](https://flatpak.org/setup/) |
|~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| office 360 | Microsoft [`link`](https://snapcraft.io/office365webdesktop) | |sudo snap install office365webdesktop --beta
| wats app | Messaging app | |sudo snap install whatsapp-for-linux |flatpak install flathub com.github.eneshecan.WhatsAppForLinux
| telegram | Messaging_app | |sudo snap install telegram-desktop|flatpak install flathub org.telegram.desktop
| viber | Messaging app | app Downlod [`link`](https://www.viber.com/en/download/) |sudo snap install viber-unofficial |flatpak install flathub com.viber.Viber
| google message | Messaging app | scan the code using phon [`link`](https://messages.google.com/web)
| kdeconnect | File transfer | sudo apt install kdeconnect
| freecad | Engineering_Drawing |sudo apt install freecad|sudo snap install freecad|flatpak install flathub org.freecadweb.FreeCAD
| shotcut | Video Editor |sudo apt install shotcut|sudo snap install shotcut --classic|[`link`](https://flathub.org/apps/details/org.shotcut.Shotcut)
| gimp | Photo Editor |
| simplescreenrecorder | Screen recorder |sudo apt install simplescreenrecorder
| audacity | Audio Editor |
| handbrake | Video compressor |
| codeblocks | Coding |
| blender | Graphic design |
| freeDownloadManager |
| ktouch | Typing Pracktice |
| virtualbox |
| terminator |
| edge | Browser
| audacious | mp3 player |

---

# Delet File --  
```
rm [file location]   (for Empty file)
rm -r [...]          (for a directory)
```
---
# install Wine -- (Windows emulator for linux)
```
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine wine64 wine32 winbind winetricks
wine xxxxxx.exe
```
<img src="https://github.com/akashdip2001/college-final-year-project/raw/main/img/colour_line.png">

---

## WSL 2 — Kali in Windows

[<img align="right" alt="WSL" width="400" src="img/wsl.jpg">](https://youtu.be/JQDbcyRa5_0)

▶️ [Video Playlist](https://youtube.com/playlist?list=PL_RecMEcs_p-iAMEQascgKVMt4juhGip2&si=nzpb4GEv-QxkROI6)

### 13.1 Setup (Windows PowerShell as Admin)

```go
wsl --install
wsl --update
wsl --status
wsl --list --online
wsl --install -d kali-linux

// set userName : XXXX
// set Passward : 1XX
```
```yaml
┌──(whitedevil㉿akashdip2001)-[/]
└─$ ls /mnt
c  d  e  wsl  wslg

┌──(whitedevil㉿akashdip2001)-[/]
└─$ cd /mnt/c/Users
ls
 akash  'All Users'   Default  'Default User'   desktop.ini   Public

┌──(whitedevil㉿akashdip2001)-[/mnt/c/Users]
└─$ cd /mnt/c/Users/akash/Desktop

┌──(whitedevil㉿akashdip2001)-[/mnt/c/Users/akash/Desktop]
└─$
```
| [WSL more details](./wsl-in-windows.md) | [File Permissions (quick)](./permissions.md) | [File Permissions (deep dive)](https://github.com/akashdip2001/linux-all-commands/blob/main/00%20Linux%20File%20Permission.md) |
| --- | --- | --- |

<img src="img/wsl remote desktop connect (3).png">
<img src="img/kali in windows.png">

### in Kali cell
```
cat /etc/os-release
// PRETTY_NAME="Kali GNU/Linux Rolling"
// NAME="Kali GNU/Linux"
// VERSION_ID="2024.3"
```

---

### 13.2 Reset WSL Password

Forgot your WSL user password? Reset it from Windows CMD using root.

```bash
# Step 1 — Open Windows CMD and set distro to login as root
ubuntu2204 config --default-user root
# (replace ubuntu2204 with your distro name e.g. kali-linux)

# Step 2 — Root WSL shell opens. Reset the password:
passwd <your-username>
# e.g.: passwd ak2001
# Enter new password when prompted

# Step 3 — Restore your normal user as default
ubuntu2204 config --default-user <your-username>
```

<img src="img/wsl pass reset.jpg">

---

### 13.3 Install Desktop Environment

## Install `mini` Desktop envirorment with `kex server` (❌ not Recommended ❌)
```
sudo apt update && sudo apt upgrade -y
sudo apt install kali-win-kex
kex --win -s
// set passward (6) Ex: 1XXAs0
// then enter Kali pass : 1XX

kex --esm --ip -s // for Wondows Remote Desktop
```
<img src="img/wsl remote desktop connect (1).png">
<img src="img/wsl remote desktop connect.png">

### Shut Down
```
exit
wsl --shutdown
```
### Uninstall kex
```
// Uninstall Win-KeX and Xfce
sudo apt purge kali-win-kex
sudo apt purge xfce4 xfce4-goodies
sudo apt autoremove --purge

// Uninstall the Current Desktop Environment (Xfce and Win-KeX)
sudo apt purge kali-win-kex xfce4 xfce4-goodies
sudo apt purge lightdm light-locker
sudo apt autoremove --purge
sudo apt clean
```
## Install `Full` Desktop envirorment (✅ Recommended ✅)
```
// Install the GNOME Desktop Environment
sudo apt update
sudo apt install kali-desktop-gnome gdm3

// Set GNOME as the Default Environment
sudo update-alternatives --config x-session-manager

// Restart WSL or the System
wsl --shutdown
wsl

// To be continue ... 
```
---

| <a href="https://akashdip2001.github.io/ubuntu-all-commaands/" class="previous">&laquo; Ubuntu linux all commands</a> <br/> |
|-----------------------------------------------------------------------------------------------------------------------------|
| <a href="https://akashdip2001.github.io/fedora-all-imp-commands/" class="next">Fedora linux all commands &raquo;</a> |

---
✔️ [**my Website**](https://akashdip2001.github.io/linktree/)
<h1 align="right">AKASHDIP MAHAPATRA</h1>
<h3 align="right">National award from Dilhi,taken from Indian precedent Pronob Mukherjee 2012,Drawing</h3>
<h5 align="right">https://youtu.be/ysBF9EfvWkk?t=428</h5>

---

<h3 align="left">Connect with me:</h3>
<p align="left">
<a href="https://linkedin.com/in/akashdip-mahapatra-330687204" target="blank"><img src="https://cdn-icons-png.flaticon.com/512/174/174857.png" alt="LinkedIn" height="40" width="40" /></a>
&nbsp;&nbsp;
<a href="https://www.youtube.com/c/akashaot" target="blank"><img src="https://cdn-icons-png.flaticon.com/512/1384/1384060.png" alt="YouTube" height="40" width="40" /></a>
&nbsp;&nbsp;
<a href="https://akashdip2001.github.io/linktree/" target="blank"><img src="https://cdn-icons-png.flaticon.com/512/841/841364.png" alt="Website" height="40" width="40" /></a>
</p>
