How to configure the network under the Ubuntu

IP configure:
If you want to configure the IP , gateway , netmask and so on, you will modify the interface file.
The path is like that /etc/network/interface.

You will modify like this:
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
address 10.19.1.234
netmask 255.255.0.0
gateway 10.19.1.1

Notes :
When you write the dns-nameserver ,the counts of the nameserver is more than 2, you must
Write like the picture, or the system can’t successfully read and if you use the command-ifconfig to check the network information. You only see the information of the lo. So you must be careful.

DNS configure:
If you want to configure the DNS. You will modify the resolve.conf.
The path is like that /etc/resolve.conf.

You will modify like this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN

nameserver 127.0.0.1

Than you will make the network working, you will like that.

/etc/init.d/networking restart.

The above way is tempore, if you want to modify the DNS forever, you need to modify the file named “base”, the path of the file is :
/etc/resolvconf/resolv.conf.d/

Samba configure

[global]
server string = Samba Server
security = share
encrypt passwords = yes

smb passwd file = /etc/samba/smbpasswd

[SambaHome]
workgroup = root
netbios name = root
path = /home
browseable = yes
writeable = yes

[Sambaroot]
workgroup = www
netbios name = www
path = /
browseable = yes
writeable = yes

+++++++++++++++++++++++
[global]
security = user
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936
dos filetime resolution = Yes
unix extensions = no
follow symlinks = yes
wide links = yes

[homes]
comment = Home Directories
writable = yes
browseable = no
create mask = 755
directory mask = 755
[works]
comment = work Directories
writable = yes
browseable = no
create mask = 755
directory mask = 755
+++++++++++++++++++++++++++++++

of cource , you need to add the samba account:
smbpasswd zhanghao

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值