These scripts are designed to configure new bare-metal OS installations or virtual machines for development and/or productivity use. The Linux scripts are split into logic for headless systems and desktop environments, whereas the Windows script can be used to configure either, and will automatically install additional GUI tools in the case of the latter.
Software:
Python Packages:
Ruby Gems:
# Download the script to a temporary file, since it can't simply be piped without a filename
SCRIPT='/tmp/ubuntu-server.sh'
wget 'https://scripts.adamrehn.com/setup/ubuntu-server.sh' -O "$SCRIPT" && bash "$SCRIPT" && rm "$SCRIPT"
Extends another script:
Software:
# Download the script to a temporary file, since it can't simply be piped without a filename
SCRIPT='/tmp/ubuntu-desktop.sh'
wget 'https://scripts.adamrehn.com/setup/ubuntu-desktop.sh' -O "$SCRIPT" && bash "$SCRIPT" && rm "$SCRIPT"
Extends another script:
Software:
GNOME Shell Extensions:
GTK Themes:
System Customisations:
# Download the script to a temporary file, since it can't simply be piped without a filename
SCRIPT='/tmp/ubuntu-desktop-adam.sh'
wget 'https://scripts.adamrehn.com/setup/ubuntu-desktop-adam.sh' -O "$SCRIPT" && bash "$SCRIPT" && rm "$SCRIPT"
# Be sure to run this from a PowerShell prompt with administrative priveleges
Set-ExecutionPolicy Bypass -Scope Process -Force;
# Download the script to a temporary file so that it can be invoked with parameters
(New-Object System.Net.WebClient).DownloadFile('https://scripts.adamrehn.com/setup/windows.ps1', "$env:TEMP\windows.ps1")
cd $env:TEMP; .\windows.ps1 [PARAMETERS]
# Parameter details:
#
# Accepts one or more positional arguments that specify the loadouts to install, or "all" to install all loadouts.
# Supported loadouts are as follows:
#
# - base (the default if no loadouts are specified)
# - c++
# - go
# - perforce
These scripts perform common disk image manipulation tasks, with a focus on development and system administration uses.
# Be sure to run this from a PowerShell prompt with administrative priveleges
# Download the latest version of `Convert-WindowsImage.psm1` from the Microsoft virtualisation tools repository
Set-ExecutionPolicy Bypass -Scope Process -Force;
iex ((New-Object System.Net.WebClient).DownloadString(`
'https://raw.githubusercontent.com/MicrosoftDocs/Virtualization-Documentation/' + `
'master/hyperv-tools/Convert-WindowsImage/Convert-WindowsImage.psm1'`
))
# Replace these values with the appropriate Windows Insider build number and ISO image file path
$previewBuild = '20150'
$insiderISO = "${env:HOMEDRIVE}${env:HOMEPATH}\Desktop\Windows10_InsiderPreview_Client_x64_en-us_${previewBuild}.iso"
$insiderVHDX = $insiderISO.Replace('.iso', '.vhdx')
# Create a VHDX image and populate it with the contents of the Windows Insider ISO image
Convert-WindowsImage `
-SourcePath $insiderISO `
-VHDPath $insiderVHDX `
-VhdType 'Fixed' `
-SizeBytes 80GB `
-DiskLayout 'UEFI' `
-Edition 'Windows 10 Pro' `
-BCDinVHD 'NativeBoot' `
-RemoteDesktopEnable
# Mount the created VHDX image and retrieve the drive letter of the mounted partition
$mounted = (Mount-VHD -Path $insiderVHDX -PassThru | Get-Disk | Get-Partition | Get-Volume).DriveLetter
# Create a boot entry for the VHDX image (this will automatically be set to the default boot entry)
bcdboot "${mounted}:\Windows"
# Set a human-readable description for the boot entry
bcdedit /set '{default}' DESCRIPTION "Windows Insider Build ${previewBuild}"
# Unmount the VHDX image
Dismount-VHD -Path $insiderVHDX
# Verify that the boot entry was configured correctly
bcdedit /enum