Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
other:win10wsl [2022/09/14 16:38] – [Creating a backup] Improved the 'FULL' section jypeter | other:win10wsl [2022/09/16 11:20] – [Package management] Started rewriting jypeter |
---|
Installé correctement</code> | Installé correctement</code> |
| |
* After installing, you will get **several new ways to open a terminal**: | * After installing WSLtty, you will get **several new ways to open a terminal**: |
* ''WSL terminal'' icon on the desktop | * **A ''WSL terminal'' icon on the desktop, that will be //The Way to open a terminal//** |
* ''Start'' => ''U'' => ''Ubuntu terminal'' (or ''Ubuntu_custom terminal'' or something similar if you have [[other:win10wsl#restoring_or_relocating_a_linux_installation|restored/relocated a Linux installation]]) | * ''Start'' => ''U'' => ''Ubuntu terminal'' (or ''Ubuntu_custom terminal'' or something similar if you have [[other:win10wsl#restoring_or_relocating_a_linux_installation|restored/relocated a Linux installation]]) |
* ''Start'' => ''W'' => ''WSL Terminal'' in the ''Start'' menu | * ''Start'' => ''W'' => ''WSL Terminal'' in the ''Start'' menu |
* There is also a ''W'' => ''WSLtty'' folder, than you probably will not need (more details in [[https://github.com/mintty/wsltty#configuration|Configuration]]), except possibly ''configure WSL shortcuts'' (//run after adding or removing WSL distributions, in order to create the respective set of shortcuts in the Start menu//) | * There is also a ''W'' => ''WSLtty'' folder, than you probably will not need (more details in [[https://github.com/mintty/wsltty#configuration|Configuration]]), except possibly ''configure WSL shortcuts'' (//run after adding or removing WSL distributions, in order to create the respective set of shortcuts in the Start menu//) |
* Open a terminal and right-click in it to check the available options | * Open a terminal and right-click in it to check the available options |
* Hint: use the ''Text'' option to select the nice //Cascadia Code// font bundled with the [[other:win10apps#windows_terminal|Windows Terminal]] | * **Recommended //text// options**: |
| * use the ''Text'' option to select the nice //Cascadia Code// font bundled with the [[other:win10apps#windows_terminal|Windows Terminal]] |
| * if you don't automatically get the ''en_US.UTF8'' localization in WSLtty when trying to [[other:win10wsl#specifying_a_correct_system_language|specify a correct system language]], explicitly force //Locale//=''en_US'' and //Character set//=''UTF-8'' in the text options |
| * {{ :other:wsltty_text_options.png?direct&250 |}} |
* You can access even more options with CTRL+right-click | * You can access even more options with CTRL+right-click |
* You can cycle between the open WSLtty terminals with CTRL+Tab and Shift+CTRL+Tab | * You can cycle between the open WSLtty terminals with CTRL+Tab and Shift+CTRL+Tab |
* [[https://github.com/mintty/mintty/wiki|Technical stuff]] (on the Mintty wiki) | * Extra [[https://github.com/mintty/mintty/wiki|technical stuff]] (on the Mintty wiki) |
| |
=== The Windows Terminal === | === The Windows Terminal === |
| |
Nothing will go wrong, but it does not hurt to [[other:win10wsl#backup_of_a_full_linux_installation|save an image of your full installation]], in case you want to try some really different settings later. | Nothing will go wrong, but it does not hurt to [[other:win10wsl#backup_of_a_full_linux_installation|save an image of your full installation]], in case you want to try some really different settings later. |
==== Specifying correctly the display language ==== | ==== Specifying a correct system language ==== |
| |
WSL will automatically try to use in the terminals the same language as the one used by the Windows 10 computer ([[https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#changing-the-display-language|ref]]), but this could lead later to some difficult to debug **side-effects** when you connect to remote Linux servers (e.g. the ''sort'' command may give different results !). | WSL will automatically try to use in the terminals the same language as the one used by the Windows computer, but this could lead later to some difficult to debug **side-effects** when you connect to remote Linux servers (e.g. the ''sort'' command may give different results !). |
| |
It is **safer** to force the system to use a //standard// English version | It is **safer** to [[https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#changing-the-display-language|force the Linux installation to use a standard English localization]]. The ''update-locale'' command will change the content of the ''/etc/default/locale'' file |
| |
<code>$ sudo update-locale LANG=en_US.UTF8 | <code>$ sudo update-locale LANG=en_US.UTF8 |
$ echo $LANG | $ echo $LANG |
en_US.UTF8 | en_US.UTF8 |
| |
| $ locale -v |
| LANG=en_US.UTF8 |
| LANGUAGE= |
| LC_CTYPE="en_US.UTF8" |
| [...] |
| LC_ALL= |
</code> | </code> |
| |
| After updating the system //localization// (and possibly restarting ''wsl'' with ''%%wsl --shutdown%%''), open the [[other:win10wsl#opening_a_terminal|available terminals]] and type ''echo $LANG'' in order to check that are indeed getting ''en_US.UTF8'' |
| |
| If you are still not getting ''en_US.UTF8'' in some terminals (e.g. you are still getting ''C.UTF-8''), you can check if you can override the //localization// options in the terminals settings. Check the [[other:win10wsl#the_wsltty_terminal|Text options of the WSLtty terminals]] |
| |
| |
| |
==== Package management ==== | ==== Package management ==== |
| |
| === How does it work ? === |
| |
| * **Ubuntu applications** are distributed through package files in **//Debian// format** (''.deb'' files) that are found in [[https://help.ubuntu.com/community/Applications#Software_repositories|software repositories]] |
| |
| * High level package management tools such as ''aptitude'' or ''synaptic'' rely on ''apt'' which, itself, relies on ''dpkg'' to manage the packages in the system |
| * The ''apt'' tool merges functionality of ''apt-get'' and ''apt-cache'' and by default has a fancier colored output format, making it more pleasant for humans. For usage in scripts or advanced use cases, ''apt-get'' is still preferable or needed |
| * ''apt*'' tools and ''dpkg'' are pre-installed on Ubuntu |
| * [[https://www.debian.org/doc/manuals/debian-faq/pkgtools.en.html#aptitude|aptitude]] can be used on the command-line or through a text-based interface. |
| * You do not need to have an [[other:x_conf|X server]] running to use ''aptitude'', therefore aptitude can be used in the early stages of a Linux installation, or on a remote Linux computer |
| * [[https://www.debian.org/doc/manuals/debian-faq/pkgtools.en.html#synaptic|synaptic]] is a graphical package manager |
| * You need to have an [[other:x_conf|X server]] running in order to use it |
| |
| * All the details can be found in [[https://www.debian.org/doc/manuals/debian-faq/pkgtools.en.html|The Debian package management tools]] |
| |
[[https://www.howtogeek.com/63997/how-to-install-programs-in-ubuntu-in-the-command-line/|apt-get tutorial]] if you are more used to Fedora/RedHat ''yum''/''dnf'' and //rpm// packages | [[https://www.howtogeek.com/63997/how-to-install-programs-in-ubuntu-in-the-command-line/|apt-get tutorial]] if you are more used to Fedora/RedHat ''yum''/''dnf'' and //rpm// packages |