linux目錄映射
Ⅰ 想問一下,如何將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目錄即可!