Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 28-07-2010, 09:12 AM   #1
emailhoc
Administrator
 
Gia nhập: Jul 2009
Trả Lời: 245
Đặt IP cho Ubuntu từ giao diện dòng lệnh
Để đặt IP cho card mạng eth0, ta tiến hành các bước như bên dưới
Bước 1: Mở file cấu hình bằng cách gõ lệnh

Mã:
sudo vi /etc/network/interfaces
Bước 2: Tùy chình các thông số theo yêu cầu. Ở đây mình thiết lập IP 192.168.0.100 cho card mạng eth0. Bên dưới là nội dung file interfaces trong trường hợp của mình các bạn tham khảo nhé.

Mã:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
        script grep
        map eth0

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
Bước 3: Khởi động lại dịch vụ

Mã:
sudo /etc/init.d/networking restart
emailhoc vắng mặt   Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 05:44 PM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.