CentOS上的Notepad本身不直接支持文件共享,可通过Samba或NFS服务实现文件共享。具体方法如下:
sudo yum install samba samba-client samba-common。/etc/samba/smb.conf,添加共享目录配置,如[share]部分指定路径、权限等。sudo mkdir /home/share和sudo chmod 777 /home/share。sudo smbpasswd -a username。sudo systemctl start smb,并设置开机启动sudo systemctl enable smb。\\CentOS_IP\share访问,在Linux上可通过mount -t cifs命令挂载共享。sudo yum install nfs-utils。/etc/exports文件,添加共享目录和客户端IP及权限,如/path/to/folder 192.168.1.0/24(rw,sync,no_root_squash)。sudo systemctl start nfs-server,并设置开机启动sudo systemctl enable nfs-server。mount命令挂载共享目录。