linux上网设置?linux怎么装软件
大家好,今天给各位分享linux上网设置的一些知识,其中也会对linux怎么装软件进行解释,文章篇幅可能偏长,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在就马上开始吧!
linux如何上网
第一步,先打开虚拟机至图形用户界面,看一下是否有网络连接。
第二步,同时按住Ctrl+Alt+F2切换到命令行界面,如下图所示。
第三步,开始输入命令打开网络连接,首先输入ifconfig,如下图所示。
第四步,再输入ifup eth0命令,此命令用来打开网络。
第五步,切换到图形用户界面,查看网络是否已经开启,如下图所示。
第六步,第五步网络已经开启成功,下面用linux自带浏览器打开页面尝试一下上网。
快速掌握Linux系统上网设置方法linux怎么设置上网
Linux系统是可操作性最高的操作系统之一,自由度最高,使用方法也最为复杂。对于技术新手来说,由于Linux系统上网设置比较复杂,想要上网可能会遇到一些困难或技术问题,下面就介绍一下快速掌握Linux系统上网设置方法。
首先,需要在Linux设置上网连接,可以使用wpa_supplicant来设置,该软件可以协助你建立连接。可以使用以下命令输入wpa_supplicant程序,该程序会一步步带你完成上网连接设置。
> sudo wpa_supplicant-D”n180211”-c/etc/wpa_supplicant.conf-i wlan0
接着你需要在配置文件中就补充一些关于你网络的一些信息,比如ssid,密码:
> network={
> ssid=”ABCNet”
> psk=”12345678”
> proto=RSN
>}
之后重新启动wifi,结束上网连接设置:
> sudo systemctl restart network.service
接着便可以设定国内dns服务器,以获得更好的访问体验:
$ sudo echo“nameserver 202.96.209.133”>>/etc/resolv.conf
$ sudo echo“nameserver 114.114.114.114”>>/etc/resolv.conf
最后可以设置upstaem,以达到访问外网:
$ sudo route add-net 0.0.0.0/0 gw 192.168.1.1
至此,Linux系统上网设置完成,可以输入ping www.baidu.com来测试是否成功,如果出现下面的界面就ok啦~
> PING www.baidu.com(220.181.111.188) 56(84) bytes of data.
64 bytes from 220.181.111.188: icmp_seq=1 ttl=53 time=111 ms
通过上面的介绍,就可以快速掌握Linux系统上网设置方法,让你能够更快更好的上网,同时,不要忘了Linux系统上还有多种自定义操作方法可以让你优化系统,让你使用起来更加舒心。
Linux如何设置上网
linux上网设置经典二法
1、一种是linux共享局域网内的windows主机上网
如果你的网卡linux能够识别的话在安装的时候会有网卡配置过程。从列表中选择网络设备,一般为eth0,点击“编辑”,在打开的“编辑接口”对话框中,用户可以通过DHCP来配置网络,这样也可以,不过我更喜欢定制一个静态IP,所以去掉“使用DHCP进行配置”前面的选项,然后在下面输入你要定制的IP地址和子网掩码,确定后,在下面的网关和主要DNS里输入当前局域网上做为主机的计算机的IP地址。这样装完以后就搞定。
如果你是装完后再安装的网卡的话,那可以在“系统设置”里选择“网络”,如果你的网卡安装成功的话会在下面的列表里看到你的网卡,同样设置DNS(和上面一样),然后再回到列表里,选中你的网卡,点上面的编辑,选中“当计算机启动时激活设备”,然后选择下面的“静态设置的IP地址”,在下面输入和上面同样的设置。再重新启动就可以了。
2、另外一种就是用你的linux通过ADSL上网了
在linux下就集成着一个ADSL拨号软件,打开终端,在里面输入#adsl-setup,然后进行设置:
LOGIN NAME
Enter your Login Name(default root):(输入你的用户名)
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like/dev/hme0.
For Linux, it will be ethX, where'X' is a number.
(default eth0):(选择网络设备)
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter'no'(two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value(default no):(选择是按需拨号,还是持续连接)
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that'the server will provide dynamic DNS addresses',
enter'server'(all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here:(选择DNS)
PASSWORD
Please enter your Password:
Please re-enter your Password:
USERCTRL
Please enter'yes'(two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection(default yes):(是否允许普通用户启动、关闭)
The firewall choices are:
0- NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1- STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2- MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall(0-2):(选择firewall的规则)
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes(default no):(选择是否随机启动)
** Summary of what you entered**
Ethernet Interface:
User name:
Activate-on-demand:
DNS addresses:
Firewalling:
User Control:
Accept these settings and adjust configuration files(y/n)?(确认一下是否接受设置)
以上的设置在“系统设置”里的“网络”里选择新建,建立一个xDSL连接,也可以实现。设置完成了以后在网络里激活连接。
上面的ADSL连接就试过一次,由于我们是局域网,所以一直用的是共享上网,如果有什么错误不要骂我,还请指教!!