Doc0x1 / test-setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸš€ Setup Guide for Debian VM on Windows Host

This guide will help you configure a Debian 12 virtual machine on a Windows host, including adjustments for screen resolution, installation of necessary software, and system configuration.

πŸ“‹ Prerequisites

  • Hyper-V enabled on Windows
  • Debian 12 ISO
  • Internet connection for the VM

πŸ›  Initial Setup

πŸ”§ Configure Screen Resolution

Run this command if you struggle to see your screen while running the setup:

xrandr | awk '/ connected/ { print $1 }' | xargs -I{} xrandr --output {} --mode 1920x1080

πŸ–₯ Create New VM

  1. Choose "New VM" (not quick create)
  2. Select "Generation 2"
  3. Go to Settings:
    • Disable Secure Boot
    • Enable guest services in the Integration Services.

πŸ“¦ Install Debian 12

Install Debian 12 as you prefer. Remember to set up both root/sudo and user accounts. During the final step of the installation:

  • Configure XFCE
  • Disable Gnome and Debian Desktop
  • Leave "Standard System Utilities" enabled

βš™οΈ Configuration Steps

🌟 Step 1: Post-Installation Setup

After the first boot:

# Login with your user account (not root)
su root  # Switch to root on that profile
apt install git -y  # Install git

πŸ“‘ Step 2: Clone and Run Setup Script

git clone https://github.com/pentestfunctions/test-setup.git
cd test-setup
chmod +x setup.sh
./setup.sh

πŸ”„ Reboot the System

After running setup.sh, the system will reboot (you can turn it off at this point).

πŸ”Œ Enable Enhanced Session Mode

Run the following command in an administrator PowerShell on the Windows host (MAKE SURE YOU CHANGE DebianTest to your Hyper-V image name):

Set-VM -VMName DebianTest -EnhancedSessionTransportType HvSocket

πŸ’» Configure RDP and Final Setup

When you boot the VM, on the login screen you will be prompted for enhanced session mode (RDP) after a few seconds. You can adjust the resolution now if you wish.

Once logged into the Xorg session, run:

wget https://github.com/pentestfunctions/test-setup/blob/main/configure.sh
chmod +x configure.sh
./configure.sh

Then simply setup your .bashrc with this one

https://github.com/pentestfunctions/test-setup/blob/main/.bashrc

About


Languages

Language:Shell 100.0%