当前位置:首页 » 操作系统 » linux目录映射

linux目录映射

发布时间: 2022-08-12 02:31:00

Ⅰ 想问一下,如何将linux目录映射到本地呢

可以用ln -s命令创建一个软连接,也就是快捷方式

它的功能是为某一个文件在另外一个位置建立一个同不的链接,这个命令最常用的参数是-s,具体用法是:ln -s 源文件 目标文件。
当 我们需要在不同的目录,用到相同的文件时,我们不需要在每一个需要的目录下都放一个必须相同的文件,我们只要在某个固定的目录,放上该文件,然后在其它的 目录下用ln命令链接(link)它就可以,不必重复的占用磁盘空间。

例如:ln -s /bin/less /usr/local/bin/less

-s 是代号(symbolic)的意思。
这 里有两点要注意:第一,ln命令会保持每一处链接文件的同步性,也就是说,不论你改动了哪一处,其它的文件都会发生相同的变化;第二,ln的链接又软链接 和硬链接两种,软链接就是ln -s ** **,它只会在你选定的位置上生成一个文件的镜像,不会占用磁盘空间,硬链接ln ** **,没有参数-s, 它会在你选定的位置上生成一个和源文件大小相同的文件,无论是软链接还是硬链接,文件都保持同步变化。

Ⅱ linux的目录要映射到windows里,除了samba还有什么方式

有一个 nfs for windows。
在linux下安装nfs服务,windows下安装nfs for windows。

Ⅲ linux地址映射是哪个文件

文件名与 Windows 下没区别: hosts,但在 Linux 下该文件位于 /etc 目录下。Windows 中这个文件在 WINDOWS\system32\drivers\etc 目录下。

Ⅳ linux磁盘映射的命令,怎么像windows一样,把其他linux服务器的磁盘映射到本机上使用。

mount -t cifs -o USERNAME=root,passwd=123 //192.168.0.2/users /root/temp

Ⅳ Linux SAMBA服务器配置共享目录,访问控制,用户映射

[global]

# ----------------------- Network Related Options-------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to thehostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
workgroup = MYGROUP
server string = Samba Server Version%v

; netbios name = MYSERVER

interfaces = lo eth0
hosts allow = 192.168.1.
user map =/etc/samba/smbusermap

# --------------------------- Logging Options-----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, thenrotate
max log size = 50

# ----------------------- Standalone Server Options------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

security = user
passdb backend = tdbsam

# ----------------------- Domain Members Options ------------------------
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# The argument list may include:
# password server = My_PDC_Name[My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
# password server = *

; security = domain
; passdb backend = tdbsam
; realm = MY_REALM

; password server =<NT-Server-Name>

# ----------------------- Domain Controller Options------------------------
#
# Security must be set to user for domain controllers
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
#
# Domain Logons let Samba be a domain logon server for Windows workstations.
#
# Logon Scrpit let yuou specify a script to be run at login time on theclient
# You need to provide it in a share called NETLOGON
#
# Logon Path let you specify where user profiles are stored (UNC path)
#
# Various scripts can be used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
#
; security = user
; passdb backend = tdbsam

; domain master = yes
; domain logons = yes

# the login script name depends on themachine name
; logon script = %m.bat
# the login script name depends on theunix user used
; logon script = %u.bat
; logon path = \\%L\Profiles\%u
# disables profiles support byspecifing an empty path
; logon path =

; add user script = /usr/sbin/useradd"%u" -n -g users
; add group script = /usr/sbin/groupadd"%g"
; add machine script = /usr/sbin/useradd-n -c "Workstation (%u)" -M -d /nohome -s /bin/false"%u"
; delete user script = /usr/sbin/userdel"%u"
; delete user from group script =/usr/sbin/userdel "%u" "%g"
; delete group script =/usr/sbin/groupdel "%g"

# ----------------------- Browser Control Options----------------------------
#
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#
# Preferred Master causes Samba to force a local browser election onstartup
# and gives it a slightly higher chance of winning the election
; local master = no
; os level = 33
; preferred master = yes

#----------------------------- Name Resolution -------------------------------
# Windows Internet Name Serving Support Section:
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
#
# - WINS Support: Tells the NMBD component of Samba to enable it's WINSServer
#
# - WINS Server: Tells the NMBD components of Samba to be a WINS Client
#
# - WINS Proxy: Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client,for this to work there must be
# at least one WINS Server on the network. The default is NO.
#
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.

; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes

# --------------------------- Printing Options-----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up indivially
#
# Cups Options let you pass the cups libs custom options, setting it toraw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option

load printers = no
cups options = raw

; printcap name = /etc/printcap
#obtain list of printers automaticallyon SystemV
; printcap name = lpstat
; printing = cups

# --------------------------- Filesystem Options---------------------------
#
# The following options can be uncommented if the filesystem supports
# Extended Attributes and they are enabled (usually by the mount option
# user_xattr). Thess options will let the admin store the DOS attributes
# in an EA and make samba not mess with the permission bits.
#
# Note: these options can also be set just per share, setting them inglobal
# makes them the default for all shares

; map archive = no
; map hidden = no
; map read only = no
; map system = no
; store dos attributes = yes

#============================ Share Definitions==============================

[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[sales]
comment = Home Directories
path=/var/samba/sales
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[finance]
comment = Home Directories
browseable = yes
path=/var/samba/finance
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes

# Un-comment the following and create the netlogon directory for DomainLogons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff

以上是smb.conf内的配置。
增加用户和组,并设置好用户组的隶属关系。
用smbpasswd -a 增加smb访问密码。

Ⅵ linux常用目录有哪些

1. bin目录

binary(二进制的):许多“指令”对应的可“执行程序文件”目录

2. sbin目录

说明:super binary 超级的 二进制 许多“指令”对应的可“执行程序文件”目录,该目录文件对应指令都是"root"用户可以执行的指令普通用户不能使用该目录里的命令:

普通用户:用$开头

root用户:用#开头

3. usr目录

说明:unxi system resource

unix system resource (unix系统资源文件目录)

该目录类似win系统的 C:/Program files 目录

该目录经常用于安装各种软件

Linux系统的核心文件只要 18M

-h:查看文件的大小

9. etc目录

系统主要配置文件目录

例如:

/etc/passwd 用于存储用户信息的文件

/etc/group 用于存储组别信息的文件

10. lib目录

library:系统资源文件类库目录

11. selinux目录(secure enhanced linux)

说明:安全增强型的linux对系统形成保护

在安装软件时会有一定的影响

12. mnt目录

说明:存放临时的映射文件系统,我们常把软驱和光驱挂装在这里的floppy和cdrom子目录下。

13. tmp目录

说明:存放临时文件的目录

Ⅶ 通过samba将linux多个目录共享并映射到windows服务器上

1、安装SAMBA
2、创建共享用的用户及samba用户

3、配置Samba共享目录
4、重启samba服务
5、Windows中访问网络共享。

Ⅷ linux通过文件夹映射给根目录扩容

哪有文件夹映射给根扩容的,如果你用逻辑卷管理,很容易给文件系统扩容,如果直接在分区上建的文件系统,最好是把根下的目录移到其它文件系统里

Ⅸ Linux系统通过什么方式将物理地址与目录进行映射

IOS系统通过了物理的方式将物理地址与日录进行映射,它这个应该是这个产品的一个最新工艺吧,具体的基于什么情景的话不是特别清楚的。

Ⅹ linux下怎么映射本地磁盘

先确认虚拟机是关闭状态(susppend时无法修改属性)
再修改虚拟机属性:(操作如下)
Edit virtual machine settings(编辑) - options(属性) - Shared Folders(选为Always enabled)
再"添加"对应的windows磁盘目录
最后在虚拟的linux下安装vmtools后,访问/mnt/hfgs目录即可!

热点内容
买的腾讯服务器是装在电脑上吗 发布:2025-01-15 23:25:58 浏览:411
如何查看电脑的配置是不是i5 发布:2025-01-15 23:24:21 浏览:434
PI数据库 发布:2025-01-15 23:14:42 浏览:882
我的世界手机版暖心服务器 发布:2025-01-15 23:05:02 浏览:169
xts压缩比 发布:2025-01-15 23:02:41 浏览:424
怎么看联系人存储位置 发布:2025-01-15 22:47:14 浏览:794
旗舰560配置的是什么发动机 发布:2025-01-15 22:40:59 浏览:626
sql多表连接查询 发布:2025-01-15 22:33:12 浏览:221
android网络休眠 发布:2025-01-15 22:32:12 浏览:350
怎么不下鲁大师查看电脑配置 发布:2025-01-15 22:30:23 浏览:311