[{"data":1,"prerenderedAt":602},["ShallowReactive",2],{"i-lucide:sun-moon":3,"i-lucide:menu":8,"post-\u002Fblog\u002F2026-01-16-installing-debian-trixie-wsl-docker":10,"surround-\u002Fblog\u002F2026-01-16-installing-debian-trixie-wsl-docker":589,"i-lucide:arrow-left":596,"i-lucide:sparkles":598,"i-lucide:user":600},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 2v2m2.837 12.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715M16 12a4 4 0 0 0-4-4m7-3l-1.256 1.256M20 12h2\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"id":11,"title":12,"authors":13,"body":16,"date":575,"description":22,"extension":576,"meta":577,"navigation":479,"path":580,"seo":581,"stem":582,"tags":583,"toc":6,"__hash__":588},"blog\u002Fblog\u002F2026-01-16-installing-debian-trixie-wsl-docker.md","Installing Debian Trixie in WSL Using Docker",[14,15],"gpt","pfarmer",{"type":17,"value":18,"toc":563},"minimark",[19,23,28,40,44,47,57,61,64,127,130,134,137,156,163,166,180,183,187,190,273,280,284,287,311,314,318,321,329,332,373,376,398,402,405,436,443,447,450,537,541,544,559],[20,21,22],"p",{},"Windows Subsystem for Linux (WSL) provides an excellent way to run Linux distributions on Windows, but it has a limitation: you can only install one instance of each distribution from the Microsoft Store. If you're already running a WSL distribution and want a fresh, separate Debian environment — perhaps for testing the upcoming Trixie release — you'll need a workaround. The solution is to use Docker to export a clean Debian rootfs and import it as a new WSL instance.",[24,25,27],"h2",{"id":26},"why-this-approach","Why This Approach?",[20,29,30,31,35,36,39],{},"While you could clone your existing distro with ",[32,33,34],"code",{},"wsl --export"," and ",[32,37,38],{},"--import",", that gives you a copy rather than a fresh start. The Docker method provides a minimal, clean Debian installation that's completely independent of your existing setup.",[24,41,43],{"id":42},"prerequisites","Prerequisites",[20,45,46],{},"Before you begin, ensure you have the following:",[48,49,50,54],"ul",{},[51,52,53],"li",{},"Windows 10\u002F11 with WSL2 enabled",[51,55,56],{},"Docker Desktop installed and running",[24,58,60],{"id":59},"creating-the-rootfs-using-docker","Creating the Rootfs Using Docker",[20,62,63],{},"Open PowerShell and run the following commands to create a minimal Debian Trixie filesystem:",[65,66,71],"pre",{"className":67,"code":68,"language":69,"meta":70,"style":70},"language-powershell shiki shiki-themes github-light github-dark-default","docker run --name debian-temp debian:trixie true\ndocker export debian-temp -o debian-trixie.tar\ndocker rm debian-temp\n","powershell","",[32,72,73,95,116],{"__ignoreMap":70},[74,75,78,82,86,89,92],"span",{"class":76,"line":77},"line",1,[74,79,81],{"class":80},"szmH1","docker run ",[74,83,85],{"class":84},"sDgYj","--",[74,87,88],{"class":80},"name debian",[74,90,91],{"class":84},"-",[74,93,94],{"class":80},"temp debian:trixie true\n",[74,96,98,101,103,106,108,111,113],{"class":76,"line":97},2,[74,99,100],{"class":80},"docker export debian",[74,102,91],{"class":84},[74,104,105],{"class":80},"temp ",[74,107,91],{"class":84},[74,109,110],{"class":80},"o debian",[74,112,91],{"class":84},[74,114,115],{"class":80},"trixie.tar\n",[74,117,119,122,124],{"class":76,"line":118},3,[74,120,121],{"class":80},"docker rm debian",[74,123,91],{"class":84},[74,125,126],{"class":80},"temp\n",[20,128,129],{},"This creates a container from the official Debian Trixie image, exports its filesystem to a tar file, and cleans up the temporary container.",[24,131,133],{"id":132},"importing-into-wsl","Importing into WSL",[20,135,136],{},"Now import the tar file as a new WSL distribution:",[65,138,140],{"className":67,"code":139,"language":69,"meta":70,"style":70},"wsl --import Trixie C:\\WSL\\Trixie debian-trixie.tar\n",[32,141,142],{"__ignoreMap":70},[74,143,144,147,149,152,154],{"class":76,"line":77},[74,145,146],{"class":80},"wsl ",[74,148,85],{"class":84},[74,150,151],{"class":80},"import Trixie C:\\WSL\\Trixie debian",[74,153,91],{"class":84},[74,155,115],{"class":80},[20,157,158,159,162],{},"The second argument is where WSL will store the virtual disk for this distribution. Choose a location that makes sense for your setup — ",[32,160,161],{},"C:\\WSL\\"," keeps things organised, but you could use any path.",[20,164,165],{},"Test that it works:",[65,167,169],{"className":67,"code":168,"language":69,"meta":70,"style":70},"wsl -d Trixie\n",[32,170,171],{"__ignoreMap":70},[74,172,173,175,177],{"class":76,"line":77},[74,174,146],{"class":80},[74,176,91],{"class":84},[74,178,179],{"class":80},"d Trixie\n",[20,181,182],{},"You should be dropped into a root shell.",[24,184,186],{"id":185},"creating-a-user-account","Creating a User Account",[20,188,189],{},"The imported image only has a root user. To create a regular user account:",[191,192,193,235],"ol",{},[51,194,195,196],{},"Update the package lists and install sudo:",[65,197,201],{"className":198,"code":199,"language":200,"meta":70,"style":70},"language-bash shiki shiki-themes github-light github-dark-default","apt update && apt upgrade -y\napt install sudo\n","bash",[32,202,203,225],{"__ignoreMap":70},[74,204,205,209,213,216,218,221],{"class":76,"line":77},[74,206,208],{"class":207},"sYRkA","apt",[74,210,212],{"class":211},"sNbzA"," update",[74,214,215],{"class":80}," && ",[74,217,208],{"class":207},[74,219,220],{"class":211}," upgrade",[74,222,224],{"class":223},"sPgVT"," -y\n",[74,226,227,229,232],{"class":76,"line":97},[74,228,208],{"class":207},[74,230,231],{"class":211}," install",[74,233,234],{"class":211}," sudo\n",[51,236,237,238],{},"Create a new user with sudo privileges:",[65,239,241],{"className":198,"code":240,"language":200,"meta":70,"style":70},"useradd -m -G sudo -s \u002Fbin\u002Fbash yourusername\npasswd yourusername\n",[32,242,243,266],{"__ignoreMap":70},[74,244,245,248,251,254,257,260,263],{"class":76,"line":77},[74,246,247],{"class":207},"useradd",[74,249,250],{"class":223}," -m",[74,252,253],{"class":223}," -G",[74,255,256],{"class":211}," sudo",[74,258,259],{"class":223}," -s",[74,261,262],{"class":211}," \u002Fbin\u002Fbash",[74,264,265],{"class":211}," yourusername\n",[74,267,268,271],{"class":76,"line":97},[74,269,270],{"class":207},"passwd",[74,272,265],{"class":211},[20,274,275,276,279],{},"Replace ",[32,277,278],{},"yourusername"," with your preferred username.",[24,281,283],{"id":282},"setting-the-default-user","Setting the Default User",[20,285,286],{},"Exit the WSL session and run this from PowerShell:",[65,288,290],{"className":67,"code":289,"language":69,"meta":70,"style":70},"wsl --manage Trixie --set-default-user yourusername\n",[32,291,292],{"__ignoreMap":70},[74,293,294,296,298,301,303,306,308],{"class":76,"line":77},[74,295,146],{"class":80},[74,297,85],{"class":84},[74,299,300],{"class":80},"manage Trixie ",[74,302,85],{"class":84},[74,304,305],{"class":223},"set-default",[74,307,91],{"class":84},[74,309,310],{"class":80},"user yourusername\n",[20,312,313],{},"Now when you start Trixie, you'll log in as your user rather than root.",[24,315,317],{"id":316},"fixing-locale-warnings","Fixing Locale Warnings",[20,319,320],{},"The minimal Docker image doesn't include generated locales, so you'll likely see warnings like:",[65,322,327],{"className":323,"code":325,"language":326},[324],"language-text","bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8)\n","text",[32,328,325],{"__ignoreMap":70},[20,330,331],{},"Fix this by installing and configuring locales:",[65,333,335],{"className":198,"code":334,"language":200,"meta":70,"style":70},"sudo apt install locales\nsudo sed -i '\u002Fen_US.UTF-8\u002Fs\u002F^# \u002F\u002Fg' \u002Fetc\u002Flocale.gen\nsudo locale-gen\n",[32,336,337,350,366],{"__ignoreMap":70},[74,338,339,342,345,347],{"class":76,"line":77},[74,340,341],{"class":207},"sudo",[74,343,344],{"class":211}," apt",[74,346,231],{"class":211},[74,348,349],{"class":211}," locales\n",[74,351,352,354,357,360,363],{"class":76,"line":97},[74,353,341],{"class":207},[74,355,356],{"class":211}," sed",[74,358,359],{"class":223}," -i",[74,361,362],{"class":211}," '\u002Fen_US.UTF-8\u002Fs\u002F^# \u002F\u002Fg'",[74,364,365],{"class":211}," \u002Fetc\u002Flocale.gen\n",[74,367,368,370],{"class":76,"line":118},[74,369,341],{"class":207},[74,371,372],{"class":211}," locale-gen\n",[20,374,375],{},"Restart the distro for the changes to take effect:",[65,377,379],{"className":67,"code":378,"language":69,"meta":70,"style":70},"wsl --terminate Trixie\nwsl -d Trixie\n",[32,380,381,390],{"__ignoreMap":70},[74,382,383,385,387],{"class":76,"line":77},[74,384,146],{"class":80},[74,386,85],{"class":84},[74,388,389],{"class":80},"terminate Trixie\n",[74,391,392,394,396],{"class":76,"line":97},[74,393,146],{"class":80},[74,395,91],{"class":84},[74,397,179],{"class":80},[24,399,401],{"id":400},"enabling-docker-desktop-integration-optional","Enabling Docker Desktop Integration (Optional)",[20,403,404],{},"If you want to use Docker commands inside your new Trixie instance without installing Docker separately:",[191,406,407,410,424,430],{},[51,408,409],{},"Open Docker Desktop",[51,411,412,413,417,418,417,421],{},"Go to ",[414,415,416],"strong",{},"Settings"," → ",[414,419,420],{},"Resources",[414,422,423],{},"WSL Integration",[51,425,426,427],{},"Enable the toggle for ",[414,428,429],{},"Trixie",[51,431,432,433],{},"Click ",[414,434,435],{},"Apply & Restart",[20,437,438,439,442],{},"The ",[32,440,441],{},"docker"," command will now be available inside Trixie.",[24,444,446],{"id":445},"managing-your-new-instance","Managing Your New Instance",[20,448,449],{},"Here are some useful commands for working with your new distribution:",[65,451,453],{"className":67,"code":452,"language":69,"meta":70,"style":70},"# List all distributions\nwsl --list --verbose\n\n# Start Trixie\nwsl -d Trixie\n\n# Shut down Trixie\nwsl --terminate Trixie\n\n# Remove Trixie completely\nwsl --unregister Trixie\n",[32,454,455,461,475,481,487,496,501,507,516,521,527],{"__ignoreMap":70},[74,456,457],{"class":76,"line":77},[74,458,460],{"class":459},"sPyeA","# List all distributions\n",[74,462,463,465,467,470,472],{"class":76,"line":97},[74,464,146],{"class":80},[74,466,85],{"class":84},[74,468,469],{"class":80},"list ",[74,471,85],{"class":84},[74,473,474],{"class":80},"verbose\n",[74,476,477],{"class":76,"line":118},[74,478,480],{"emptyLinePlaceholder":479},true,"\n",[74,482,484],{"class":76,"line":483},4,[74,485,486],{"class":459},"# Start Trixie\n",[74,488,490,492,494],{"class":76,"line":489},5,[74,491,146],{"class":80},[74,493,91],{"class":84},[74,495,179],{"class":80},[74,497,499],{"class":76,"line":498},6,[74,500,480],{"emptyLinePlaceholder":479},[74,502,504],{"class":76,"line":503},7,[74,505,506],{"class":459},"# Shut down Trixie\n",[74,508,510,512,514],{"class":76,"line":509},8,[74,511,146],{"class":80},[74,513,85],{"class":84},[74,515,389],{"class":80},[74,517,519],{"class":76,"line":518},9,[74,520,480],{"emptyLinePlaceholder":479},[74,522,524],{"class":76,"line":523},10,[74,525,526],{"class":459},"# Remove Trixie completely\n",[74,528,530,532,534],{"class":76,"line":529},11,[74,531,146],{"class":80},[74,533,85],{"class":84},[74,535,536],{"class":80},"unregister Trixie\n",[24,538,540],{"id":539},"conclusion","Conclusion",[20,542,543],{},"This method gives you a clean, minimal Debian Trixie installation running alongside your existing WSL distributions. It's perfect for testing the upcoming Debian release, isolating development environments, or simply having a fresh playground without affecting your main setup.",[20,545,546,547,550,551,554,555,558],{},"The same technique works for any Debian release — just change ",[32,548,549],{},"debian:trixie"," to ",[32,552,553],{},"debian:bookworm",", ",[32,556,557],{},"debian:sid",", or whichever version you need.",[560,561,562],"style",{},"html pre.shiki code .sYRkA, html code.shiki .sYRkA{--shiki-default:#6F42C1;--shiki-dark:#FFA657}html pre.shiki code .sNbzA, html code.shiki .sNbzA{--shiki-default:#032F62;--shiki-dark:#A5D6FF}html pre.shiki code .szmH1, html code.shiki .szmH1{--shiki-default:#24292E;--shiki-dark:#E6EDF3}html pre.shiki code .sPgVT, html code.shiki .sPgVT{--shiki-default:#005CC5;--shiki-dark:#79C0FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sDgYj, html code.shiki .sDgYj{--shiki-default:#D73A49;--shiki-dark:#FF7B72}html pre.shiki code .sPyeA, html code.shiki .sPyeA{--shiki-default:#6A737D;--shiki-dark:#8B949E}",{"title":70,"searchDepth":118,"depth":118,"links":564},[565,566,567,568,569,570,571,572,573,574],{"id":26,"depth":97,"text":27},{"id":42,"depth":97,"text":43},{"id":59,"depth":97,"text":60},{"id":132,"depth":97,"text":133},{"id":185,"depth":97,"text":186},{"id":282,"depth":97,"text":283},{"id":316,"depth":97,"text":317},{"id":400,"depth":97,"text":401},{"id":445,"depth":97,"text":446},{"id":539,"depth":97,"text":540},"2026-01-16","md",{"type":578,"layout":579},"post","blog_page","\u002Fblog\u002F2026-01-16-installing-debian-trixie-wsl-docker",{"title":12,"description":22},"blog\u002F2026-01-16-installing-debian-trixie-wsl-docker",[584,585,586,587],"devops","linux","sysadmin","wsl","Zy1LeidX9TIp5GTJVByt6ALBSQ87IWpqZpxNqF6NVWY",[590,595],{"title":591,"path":592,"stem":593,"date":594,"children":-1},"Signing git commits with SSH keys","\u002Fblog\u002F2025-04-23-signing-git-commits-with-ssh-keys","blog\u002F2025-04-23-signing-git-commits-with-ssh-keys","2025-04-23",null,{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":597},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":599},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594zM20 2v4m2-2h-4\"\u002F>\u003Ccircle cx=\"4\" cy=\"20\" r=\"2\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":601},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"\u002F>\u003Ccircle cx=\"12\" cy=\"7\" r=\"4\"\u002F>\u003C\u002Fg>",1783616164228]