# HG changeset patch # User Oleksandr Gavenko # Date 1710166143 -7200 # Node ID 6c5859f2cff67828d7509a8d1e2494b0a8436e70 # Parent c3dcc61e9e3d323e27ecf36d849704c534407b8b# Parent 0230a6677c40ac0aa43126152729f104e63e00b3 merged diff -r 0230a6677c40 -r 6c5859f2cff6 cygwin.rst --- a/cygwin.rst Sat Feb 17 23:00:15 2024 +0200 +++ b/cygwin.rst Mon Mar 11 16:09:03 2024 +0200 @@ -12,6 +12,24 @@ http://cygwin.com/mirrors.html Official mirror list. +Download installed, run it and additionally select: + +* ``make`` to install my personal configs +* ``git`` to clone ``apt-cyg`` +* ``wget``, ``libiconv`` are dependencies for ``apt-cyg`` + +Add Cygwin's ``/bin`` to Windows' ``PATH`` so you could lauch ``mintty`` and clone ``apt-cyg`` and +add it to ``PATH`` too:: + + cd ~/work/cygwin + git clone https://github.com/kou1okada/apt-cyg + cp apt-cyg/apt-cyg ~/.local/bin + +Integrate bash-completion for ``apt-cyg``:: + + apt-cyg install bash-completion + apt-cyg completion-install + Important packages: * ``bash-completion`` - for human CLI. diff -r 0230a6677c40 -r 6c5859f2cff6 wsl.rst --- a/wsl.rst Sat Feb 17 23:00:15 2024 +0200 +++ b/wsl.rst Mon Mar 11 16:09:03 2024 +0200 @@ -176,3 +176,34 @@ [wsl2] kernel=C:\\Users\\\\vmlinux +Enabling trimming +================= + +:: + + wsl --manage $NAME --set-sparse true + wsl --manage $NAME --set-sparse false + +or in ``.wslconfig``:: + + [experimental] + sparseVhd=true + +https://devblogs.microsoft.com/commandline/windows-subsystem-for-linux-september-2023-update/#automatic-disk-space-clean-up-set-sparse-vhd + Automatic disk space clean up (Set sparse VHD). + +Legacy solutions were based on re-importing existing image, like: + +https://github.com/okibcn/wslcompact + Compacts the size of the ever-growing WSL vhdx images. + +or filling with zeros and processing VHD: + +https://github.com/bendover94/reclaim_wsl_mem + ``sudo dd if=/dev/zero of=/0bits bs=20M`` + ``Optimize-VHD``. + +Check TRIM support in the distro:: + + sudo apt install hdparm + sudo hdparm -I /dev/sdc + diff -r 0230a6677c40 -r 6c5859f2cff6 xdg.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xdg.rst Mon Mar 11 16:09:03 2024 +0200 @@ -0,0 +1,24 @@ + +===== + XDG +===== + +Spec +==== + +==================== ========================== +``XDG_DATA_HOME`` ``$HOME/.local/share`` +``$XDG_CONFIG_HOME`` ``$HOME/.config`` +``$XDG_STATE_HOME`` ``$HOME/.local/state`` +==================== ========================== + +Distributions should ensure ``$HOME/.local/bin`` shows up in PATH. + + +https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html + XDG Base Directory Specification. + +https://wiki.archlinux.org/title/XDG_Base_Directory + Arch Linux XDG Base Directory. +https://wiki.archlinux.org/title/XDG_user_directories + Arch Linux XDG user directories.