ubuntu14.04 配置网络的练习


本文参考的资料:

  https://blog.csdn.net/liu782726344/article/details/52912797

感谢作者的分享!


打开配置文件进行修改:

sudo vim /etc/network/interfaces

看到配置文件的内容是:

# The loopback network interface
auto lo
iface lo inet loopback # The primary network interface
auto eth0
iface eth0 inet dhcp

修改增加新内容:

# The loopback network interface
auto lo
iface lo inet loopback # The primary network interface
auto eth0
#iface eth0 inet dhcp iface eth0 inet static
address 静态IP地址
netmask 255.255.255.0
gateway 默认网关 dns-nameservers DNS1 DNS2

其中的静态IP地址、默认网关、DNS1、DNS2,请根据本地电脑的配置,进行相应配置。

然后关机,设置网络的连接方式为【桥接网卡】,启动ubuntu。

查看ip地址,发现ip地址为刚才配置的ip信息,ping一个网址,有数据响应,表示可以上网了。


总结:

  ubuntu 14.04 的网络配置文件位置:/etc/network/interface。

  ubuntu 14.04 的重启网络的命令是:sudo /etc/init.d/networking restart。


ubuntu14.04 配置网络的更多相关文章

  1. Caffe+CUDA7.5+CuDNNv3+OpenCV3.0+Ubuntu14.04 配置参考文献 以及 常见编译问题总结

    Caffe+CUDA7.5+CuDNNv3+OpenCV3.0+Ubuntu14.04  配置参考文献 ---- Wang Xiao Warning: Please make sure the cud ...

  2. Caffe+CUDA8.0+CuDNNv5.1+OpenCV3.1+Ubuntu14.04 配置参考文献 以及 常见编译问题总结

    Caffe + CUDA8.0 + CuDNNv5.1 + OpenCV3.1 + Ubuntu14.04  配置参考文献 ---- Wang Xiao  Anhui University  CVPR ...

  3. Ubuntu14.04配置gcc4.4.4+Qt4.8.4交叉编译环境

    安装32位程序运行支持 sudo apt-get install lib32stdc++6 lib32z1 lib32ncurses5 lib32bz2-1.0 可能报错: lib32stdc++6 ...

  4. ubuntu14.04 的网络配置

    为eth0 配置网络 vi /etc/network/intefaces 添加以下内容 auto eth0 iface eth0 inet static address 192.168.0.10 ne ...

  5. Ubuntu14.04配置Mono+Jexus

    总所周知,ASP.NET是微软公司的一项技术,是一个网站服务端开发的一种技术,它可以在通过HTTP请求文档时再在Web服务器上动态创建它们,就是所谓动态网站开发,它依赖运行于 IIS 之中的程序 .但 ...

  6. ubuntu14.04 配置中文输入法

    ubuntu14.04自带中文输入法,只要配置就可以了. 1.安装中文支持 System Settings -->  Language Support 点击 install/remove lan ...

  7. ubuntu14.04配置中文latex完美环境(texlive+texmaker+lyx)

    Ubuntu下的文档编辑虽然有libreoffice,但对中文和公式的排版始终不如ms office,因此要想写出高质量的文档,只能靠latex了,现在随着xeCjk的开发,中文文档在ubuntu下的 ...

  8. 64位ubuntu14.04配置adb后提示没有那个文件或目录

    1.配置完adb环境变量后在终端输入adb: ameyume@ameyume-HP-450-Notebook-PC:~$ adb /home/ameyume/adt-bundle-linux-x86_ ...

  9. ubuntu14.04 配置tomcat8

    ubuntu下配置tomcat的过程事实上和windows是差点儿相同的,以下一起来看一下怎样在ubuntu14.04中配置tomcat. 1.下载tomcat 地址:http://tomcat.ap ...

随机推荐

  1. windows系统下如何正确安装Cygwin(图文详解)

    我的操作系统信息是 1.在官网https://cygwin.com/install.html下载win64位安装包 选择包的下载存放目录,点击“下一步”   为了使我们安装的Cygwin能够编译程序, ...

  2. joda日期格式转换

    public static String parseDateTime(String date,String formatFrom,String formatTo){ DateTimeFormatter ...

  3. AngularJS ng-repeat下使用ng-model

    1 2 3 blue:<input type="radio" value="1" ng-model="selectValue"/> ...

  4. AJPFX解析Java关键字之assert

    Java有许多关键字,但是这个关键字估计很少有人了解,今天就跟大家谈一谈这个关键字吧. 先说明一下,这个关键字开发中用的极少,感兴趣的朋友可以了解一下. 一.概述 在C和C++语言中都有assert关 ...

  5. LN : leetcode 413 Arithmetic Slices

    lc 413 Arithmetic Slices 413 Arithmetic Slices A sequence of number is called arithmetic if it consi ...

  6. 短视频SDK用于旅游行业

    超级简单易用的短视频SDK来自RDSDK.COM.锐动天地为开发者提供短视频编辑.视频直播.特效.录屏.编解码.视频转换,等多种解决方案,涵盖PC.iOS.Android多平台.以市场为导向,不断打磨 ...

  7. [备忘]Notification的实用

    Intent resultIntent = null; if (!TextUtils.isEmpty(tid)){ resultIntent = new Intent("com.shijie ...

  8. CE工具里自带的学习工具--第四关

    图解:

  9. 使用GetLogicalDriveStrings获取卷标

    #include <windows.h> #include <stdio.h> #define BUFSIZE 512 int main() { TCHAR szTemp[BU ...

  10. Java A

    4.在ORACLE大数据量下的分页解决方法.一般用截取ID方法,还有是三层嵌套方法. 答:一种分页方法 <% int i=1; int numPages=14; String pages = r ...