How to reset Alpine distro in WSL2? - windows-subsystem-for-linux

I completely borked my Alpine configuration when attempting to connect Docker Desktop several times. I've done the usual --unregister Alpline and then reinstalling from the app store.
Is there a quicker way of doing this?

I've gotten this to work in Windows 11 Pro without touching the UI.
Open Windows Powershell in Windows Terminal.
Verify that Alpine is installed: wsl -l -v
Unregister Alpine: wsl --unregister Alpine
Verify that Alpine has been unregistered: wsl -l -v
Register Alpine by starting it: Alpine
Unregistering the Alpine distro from WSL does not delete it from your system.

Related

How to install MSSQL-Server on Ubuntu 22.04

I am trying to install MSSQL-Server on my Ubuntu 22.04. I know that it does not currently support Ubuntu 22.04. I need to find a workaround to install the software as I don't want to downgrade.
I tried installing but it keeps giving me dependency errors. How do I solve it? Any help would be appreciated.
Unfortunately, at this time, SQL Server 2019 only works on Ubuntu 20/21. 22.04 is not supported at this time.
So either you will have to use Ubuntu 20 or, as others have stated, use Docker Containers.
You can install Docker into Ubuntu 22.04. It's a multi-step process, but it isn't that difficult.
Install Docker Engine on Ubuntu (follow the Install using the repository section)
https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository
Install SQL Server Container
https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash
That should do it.
Also, in link #2, read further below on how to connect to your docker image to run SQLCMD from within the container.
Like SQL Server 2019, you cannot install the SQLCMD tools directly into your Ubuntu 22.04 installation. But the Docker container image contains the sqlcmd tool for you to be able to connect to the database.
Or, you can use Visual Studio Code with the SQL Server (mssql) extension and it can connect to your SQL Server instance in your running Docker container.
The connection string would be:
"Server=localhost;Database=your database name;User Id=user id;Password=password"
You can leave out the Database setting if you just want to connect to the default database.
If you create any databases, you can then connect to them directly by specifying the name.
I also have same problem like this. I also tried downgrading Openssl to 1.1.1k and 1.1.1s but still not works. And finally I found this explanation
https://github.com/microsoft/msphpsql/issues/1419#issuecomment-1303626500
So, keep use OpenSSL 3.0.2 and you just need to change the SECLEVEL to 0 instead of 1 in /etc/ssl/openssl.conf
[system_default_sect]
CipherString = DEFAULT:#SECLEVEL=0
And it works, now I can connect to SQL Server using Ubuntu 22.04.
Looked at this
and it has worked for me!
So worth giving it a shot
cd /opt/mssql/lib
ls -la
sudo rm libcrypto.so libssl.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 libcrypto.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.1 libssl.1.1
If libssl is not installed, try:
sudo apt install libssl1.1
Update: I had issues connecting using libssl1.1, so I switched to 1.0 after performing the previous steps, so I also did the following:
sudo systemctl stop mssql-server
sudo systemctl edit mssql-server
Added:
[Service]
Environment="LD_LIBRARY_PATH=/opt/mssql/lib"
Then:
sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /opt/mssql/lib/libssl.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /opt/mssql/lib/libcrypto.so
Then started mysql-server and things just worked fine!

WSLG on Windows Insider Preview build - Unable to load gui apps

Getting can not open display error in wslg on windows Insider build.
If you are installing Ubuntu or other distro from Windows Store then they comes with wsl version 1. wslg is only compatible with WSL 2.
you can list the distros using :
wsl --list -v
then choose distro you want to use and fire below command:
wsl --set-version your_distro_name_with_version_goes_here 2
for example:
wsl --set-version Ubuntu-20.04 2
after that restart wsl using
wsl --shutdown
Check screen shots for refeence.
Source : https://github.com/microsoft/wslg

Linux Subsystem can't install and recognize packages

I am using windows and didn't wanted to switch to linux. I still wanted to learn it so I downloaded ubuntu subsystem for windows. It works fine and I can also execute linux commands on it. But the problem is I can't check my pip version using "pip --version" command also I can't access nodejs . It says that node isn't recognized. But it is working fine on my cmd windows terminal. How can I make it work ? Do I really have to download all these packages again after running "sudo apt update" command.
Yes, you have to download all these packages again for Ubuntu-WSL. That is because WSL is not compatible with windows executable, just like Ubuntu is supposed to be.

I have installed KDE plasma but Konsole is missing. How to return to CLI?

I recently installed Arch Linux in my virtual box and then installed kde plasma on it by using the following command-
pacman -S plasma
When I rebooted after enabling sddm, the desktop environment did not have Konsole, dolphin, etc.
Is there a way to return to the CLI without resetting the VM?
You can switch to tty via ctrl+alt+F<1-7>.
Normally the plasma Environment runs either on ctrl+alt+F1 or ctrl+alt+F7 so try 2-6!
Once you press Ctrl+Alt+F2 and logged in type the command below
sudo pacman -S konsole
This will install Konsole 19.04.3-1-x86_64
Then you wont have to always use the Ctrl+Alt+F2 method. Also Ctrl+Alt+F1 will take you back to your GUI.
Hope this helps

Redis desktop dependency on libicu52 for ubuntu12.04

I want to use a redis browser and I found redis-desktop-manager.
(http://redisdesktop.com/download)
I downloaded a deb file but it requested libicu52.
Frist. How can I install this one in Ubuntu12.04.
Second. I found later that it seems to support Ubuntu version 14+.
Would I run this on 12.04 version?
For the dependency of libicu52 Redis Desktop fail to install. You can follow bellow step:
Step 1: To download the libicu52 file. Run the command in the terminal:
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-8ubuntu0.2_amd64.deb
Step 2: Install libicu52 by executing this command:
dpkg -i libicu52_52.1-8ubuntu0.2_amd64.deb
Now, Attempt once again to install redis-desktop-manager client from debian file, I believe now everything is fine ;)
FYI, redis-desktop-manager installs and runs perfectly on my 15.10 systems.
You can probably compile redis-desktop-manager from source on your system, using the libicu* version that comes with 12.04. I would also consider upgrading: 12.04 is no longer supported, has been replaced as an LTS by 14.04 and it generally far behind.
FWIW redis-desktop-manager installs and runs fine on my 15.04 and 15.10 systems.