Skip to content

Instantly share code, notes, and snippets.

@MHacker9404
MHacker9404 / ubuntu-hardening.md
Created January 28, 2021 17:45 — forked from lokhman/ubuntu-hardening.md
List of things for hardening Ubuntu

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
@MHacker9404
MHacker9404 / podman-rancher-desktop.ps1
Last active August 20, 2025 15:35
PodMan and Rancher-Desktop setup
<#
.SYNOPSIS
Installs and configures Podman and Rancher Desktop on Windows using winget, and sets DOCKER_HOST for VS2022 container development.
.DESCRIPTION
- Installs Podman (RedHat.Podman) and Rancher Desktop (RancherDesktop.RancherDesktop) via winget.
- Initializes and starts a Podman machine.
- Uses `podman machine inspect` to read the named pipe from ConnectionInfo.PodmanPipe.Path (and DockerPipe.Path if present) and sets DOCKER_HOST.
- Configures Rancher Desktop to use containerd and enables Kubernetes.
- Restarts Rancher Desktop to apply settings.
# Configure-Win11-Environment.ps1
# PowerShell script to enable Windows features and install WSL distros on Windows 11
# Requires running as Administrator
function Enable-WindowsFeatures {
Write-Host "Enabling required Windows features..."
$features = @(
"NetFx3", # .NET Framework 3.5
"NetFx4-AdvSrvs", # .NET Framework 4.8
"Containers", # Containers
# Installs multiple packages with winget.
# - The list of packages is defined in the $Packages array (by winget "Id").
# - The script launches each installer interactively and then pauses so you can respond to the UI
# before moving on to the next package.
# Edit this list to the package IDs you want to install (use: winget search <name> to find IDs)
$Packages = @(
'Git.Git',
'Microsoft.VisualStudioCode',
'Google.Chrome',