2016年12月6日 星期二

Linux 的網路連線設定

source:
http://askubuntu.com/questions/760871/network-settings-fail-for-ubuntu-xenial64-vagrant-box

Actually, additionally to Maximes answer, you could change the GRUB commandline in your box until the new version is propagated.
Just go to /etc/default/grub and set the appropriate line to GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" You have to change the /etc/network/interfacesto reflect the correct names (eth0...)
source:

$ edit /etc/network/interfaces

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
# automatically added when upgrading
auto eth0
iface eth0 inet static
        address 211.21.247.10
        netmask 255.255.255.248
        network 211.23.247.8
        broadcast 211.23.247.15
        gateway 211.23.247.9

$ /etc/init.d/networking stop         # 停掉網路裝置
$ ifconfig                            # 你會發現空空如也
$ /etc/init.d/networking start        # 啟動網路裝置
$ ifconfig                            # 網路裝置回覆 
$ route -n                            # 網路裝置回覆 

错误“Error found when loading /root/.profile”解决

source:
http://blog.sina.com.cn/s/blog_68b1e07d0102vcqd.html



在刚修改完root权限自动登录后,发现开机出现以下提示:
Error found when loading /root/.profile
stdin:is not a tty
…………
解决方法:在终端中用命令gedit /root/.profile,打开文件后找到“mesg n”,
将其更改为“tty -s && mesg n”。

sudo do-release-upgrade 更新ubuntu

source:

http://stackoverflow.com/questions/30316812/ubuntu-apt-get-unable-to-fetch-packages


I tried using :
sudo do-release-upgrade
and then use :
sudo apt-get update
after that you will be able to install any packages.

If this did not worked for you try to change the network conf in apt.conf