To map a network drive, type the following command:
net use DRIVE: PATH
DRIVE is the drive letter you want to use and PATH is the full UNC path to the share.
So, for example, if we wanted to map drive letter K to the share \\PC-name\files, we’d use the following command:
net use K: \\PC-name\files
By default, mapped drives are not persistent. If we map drives using the commands we’ve talked about so far, the mapped drives would disappear when you restarted your computer. If you’d rather those mapped drives stick around, you can make them persistent by using the
/persistent switch. The switch works as a toggle:
- /persistent:Yes: Makes the connection you’re currently creating persistent. Future connections you make using the command during the same session are also persistent (you don’t need to keep using the switch) until you use the
/persistent:Noswitch to turn it off.
- /persistent:No: Turns off the persistency toggle. Future connections you make are not persistent until you turn the toggle back on.
So, essentially, you could type something like the following command:
net use s: \\tower\movies /user:HTG CrazyFourHorseMen /persistent:Yes
And the drive map would be persistent. All future mapping you create (even if you don’t use the
/persistent:Yes switch) will also be persistent until you turn it off using the
If you ever need to delete a mapped network drive, all you have to do is specify the drive letter and add the /delete switch. For example, the following command would delete the drive mapping we assigned to drive S:
net use s: /delete
You can also use the asterisk as a wildcard should you ever want to delete all your mapped drives in one go:
net use * /delete
How to Install Remote Desktop - Xrdp Server on CentOS 8
Installing Desktop Environment
dnf groupinstall "Server with GUI"
dnf install epel-release
dnf install xrdp
systemctl enable xrdp --now
You can verify that Xrdp is running by typing:
netstat -antup | grep xrdp
systemctl status xrdp
firewall-cmd --permanent --add-port=3389/tcp firewall-cmd --reload
chcon --type=bin_t /usr/sbin/xrdp chcon --type=bin_t /usr/sbin/xrdp-sesman
Problem with yum update
[root@b1s tmp]# yum update
Extra Packages for Enterprise Linux Modular 8 - x86_64 148 kB/s | 117 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 2.6 MB/s | 8.0 MB 00:03
created by dnf config-manager from file:///root/= 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'root_':
- Curl error (37): Couldn't read a file:// file for file:///root/=/repodata/repomd.xml [Couldn't open file /root/=/repodata/repomd.xml]
Błąd: Failed to download metadata for repo 'root_': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Open folder /etc/yum.repos.d
delete epel repository - files with new date
How to temporarily Disable SELinux on CentOS 8
Before you start disabling SELinux on CentOS 8, it’s prudent that you first check the status of SELinux.