Linux Tutorials - Herong's Tutorial Examples - v1.32, by Dr. Herong Yang
Mount Windows Shared Folders
Provides a tutorial example on how to mount Windows shared folders on Linux systems. 'cifs-utils' device driver is needed.
If you have a Windows computer on the local network, you can share a folder with your Linux computer. Here is what I did to share a folder on my Windows 10 with my CentOS 8 computer.
1. On my Windows 10 computer, create share folder and make it available for sharing:
2. On my CentOS 8 computer, install cifs-utils device drive and mount the shared folder. Note that "192.168.1.7" is the IP address of my Windows 10 computer. "herong" is the username on Windows 10 computer.
herong$ sudo dnf install cifs-utils ... installed: cifs-utils-6.8-3.el8.x86_64 herong$ sudo mkdir /mnt/share herong$ sudo mount -t cifs -o username=herong //192.168.1.7/share /mnt/share Password for herong@//192.168.1.7/share: ********
3. Verify the shared folder. It works as expected!
herong$ sudo touch /mnt/share/junk herong$ sudo ls -l /mnt/share/junk -rwxr-xr-x. 1 root root 0 Oct 10 22:31 /mnt/share/junk
4. To mount it under a private user and group, you need to specify additional options on the "mount" command. For example, the following command mounts the shared folder for me to access only:
herong$ sudo mount -t cifs \ -o username=herong,uid=herong,gid=herong,dir_mode=0700,file_mode=0700 \ //192.168.1.7/share /mnt/share herong$ ls -l /mnt drwx------. 2 herong herong 0 Oct 10 22:49 share
Cool. This is perfect for me to transfer files between my Windows 10 and CentOS 8 computer!
For more information on "cifs-utils" device driver, run "man mount.cifs" command to read its man page.
Table of Contents
Cockpit - Web Portal for Administrator
"df" - Display Free Space of File System
Mount USB Drive as File System
"fdisk" - Format Disk Partitions
"dd" - Copy Data from/to Storage Devices
Use "dd" Command to Test I/O Speed
"hdparm" - Hard Disk Parameters
"du" - Display Disk Usage of Directories
Mount Windows NTFS File System
Access Persmissions on "ntfs-3g" File System
File System Types, IDs and Formats
"parted" - Partition Manipulation Program
Reformat NTFS Partition into EXT4 Partition
Unreachable Remote File Systems
SELinux - Security-Enhanced Linux
Software Package Manager on CentOS - DNF and YUM
Running Apache Web Server (httpd) on Linux Systems
Running PHP Scripts on Linux Systems
Running MySQL Database Server on Linux Systems
Running Python Scripts on Linux Systems
vsftpd - Very Secure FTP Daemon
Postfix - Mail Transport Agent (MTA)
Dovecot - IMAP and POP3 Server
Email Client Tools - Mail User Agents (MUA)