Difference between revisions of "IT-OS-Admin-Winodws"

From wiki.samerhijazi.net
Jump to navigation Jump to search
(Admin Config/tools)
(WSL)
Line 30: Line 30:
 
* https://docs.microsoft.com/en-us/windows/wsl/
 
* https://docs.microsoft.com/en-us/windows/wsl/
 
* https://fedoramagazine.org/wsl-fedora-33/
 
* https://fedoramagazine.org/wsl-fedora-33/
 +
==cli==
 +
<pre class="code">
 +
$ wsl -l                                        # Lists distributions.
 +
$ wsl -s distro-name                            # Sets the distribution as the default.
 +
$ wsl -d distro-name                            # Run the specified distribution.
 +
$ wsl -u user                                    # Run as the specified user.
 +
$ wsl --unregister distro-name                  # Unregisters the distribution.
 +
$ wsl --export distro-name file-name            # Exports the distribution to a tar file.
 +
$ wsl --import distro-name location file-name    # Imports the specified tar file as a new distribution.
 +
</pre>
 +
==Ubuntu==
 
<pre class="code">
 
<pre class="code">
# Multi-Ubuntu
 
 
wsl --unregister Ubuntu-18.04
 
wsl --unregister Ubuntu-18.04
 
wsl --export Ubuntu-18.04 Ubuntu-18.04.tar
 
wsl --export Ubuntu-18.04 Ubuntu-18.04.tar
 
wsl --import Ubuntu-Fabric ./Ubuntu-Fabric ./Ubuntu-18.04.tar
 
wsl --import Ubuntu-Fabric ./Ubuntu-Fabric ./Ubuntu-18.04.tar
wsl -d Ubuntu-Fabric
+
wsl -d Ubuntu-Fabric                                              
 
</pre>
 
</pre>
 +
==Fedora==
 
<pre class="code">
 
<pre class="code">
# Fedora
 
 
wget https://github.com/fedora-cloud/docker-brew-fedora/blob/33/x86_64/fedora-33.20201230-x86_64.tar.xz
 
wget https://github.com/fedora-cloud/docker-brew-fedora/blob/33/x86_64/fedora-33.20201230-x86_64.tar.xz
 
xz --decompress fedora-33.20201230-x86_64.tar.xz
 
xz --decompress fedora-33.20201230-x86_64.tar.xz

Revision as of 11:01, 27 February 2021

Mix

Theming

Resetting & Update to Pro

Admin Config/tools

C:\> netsh winhttp show proxy                      # lists system-proxy
C:\> doskey np=notepad++.exe $*
C:\> netstat -ano | find "5005"
C:\> taskkill /F /PID 1196
C:\> mklink /J "C:\Link To Folder" "C:\Users\Name\Original Folder"           # Symbolic Links

Windows-Terminal

WSL

cli

$ wsl -l                                         # Lists distributions.
$ wsl -s distro-name                             # Sets the distribution as the default.
$ wsl -d distro-name                             # Run the specified distribution.
$ wsl -u user                                    # Run as the specified user.
$ wsl --unregister distro-name                   # Unregisters the distribution.
$ wsl --export distro-name file-name             # Exports the distribution to a tar file.
$ wsl --import distro-name location file-name    # Imports the specified tar file as a new distribution.

Ubuntu

wsl --unregister Ubuntu-18.04
wsl --export Ubuntu-18.04 Ubuntu-18.04.tar
wsl --import Ubuntu-Fabric ./Ubuntu-Fabric ./Ubuntu-18.04.tar
wsl -d Ubuntu-Fabric                                                

Fedora

wget https://github.com/fedora-cloud/docker-brew-fedora/blob/33/x86_64/fedora-33.20201230-x86_64.tar.xz
xz --decompress fedora-33.20201230-x86_64.tar.xz
wsl --import Fedora-33 ./Fedora-33 ./fedora-33.tar
wsl -d Fedora-33
---
dnf update
dnf install wget curl sudo ncurses dnf-plugins-core dnf-utils passwd findutils
useradd -G irbid samer
passwd samer
exit
---
wsl -d Fedora-33 -u samer
---
$id -u
1000
$ sudo cat /etc/shadow
---
Get-ItemProperty Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\*\ DistributionName | Where-Object -Property DistributionName -eq Fedora-33  | Set-ItemProperty -Name DefaultUid -Value 1000
wsl -d Fedora-33
---
sudo dnf copr enable trustywolf/wslu