[网络]Linux一些网络知识
2023-09-14 08:57:47 时间
今天刚搬到新家,ubuntu一启动,无线网络又连不上了,之前就是大费周折才搞好的,于是又花了两小时才搞好。
下面就先来了解一些基础知识:
1. ifconfig输出的eth0/lo/wlan0分别代表什么?
eth0 Link encap:Ethernet HWaddr bc:ee:7b:c7:33:ed UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:17 eth0:avahi Link encap:Ethernet HWaddr bc:ee:7b:c7:33:ed inet addr:169.254.10.167 Bcast:169.254.255.255 Mask:255.255.0.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 Interrupt:17 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:923 errors:0 dropped:0 overruns:0 frame:0 TX packets:923 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:107174 (107.1 KB) TX bytes:107174 (107.1 KB) wlan0 Link encap:Ethernet HWaddr 24:0a:64:6d:03:1f inet addr:192.168.0.7 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::260a:64ff:fe6d:31f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6124 errors:0 dropped:0 overruns:0 frame:0 TX packets:5628 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3442818 (3.4 MB) TX bytes:801863 (801.8 KB)
- eth0: 代表以太网的有线网卡接口,如果电脑上的有线网卡只有1个,ifconfig却能看到eth1/eth2,那么说明有虚拟网卡被创建
- lo: localhost, 也就代表了127.0.0.1,127.0.0.1是私有回环测试地址,就是本机地址,内网IP是不可以回环的,常用来做本机既是主又是从的测试使用。
- wlan0: 无线网卡对应的接口
2. rfkill unblock all
今天就是用这条命令把电脑的无线网重新用起来的,之前用rfkill list看wireless lan的soft/hard block都是no, 所以就没纠结在此,没想到最后还是这个。
Many computer systems contain radio transmitters, including Wi-Fi, Bluetooth, and 3G devices. These devices consume power, which is wasted when the device is not in use. RFKill is a subsystem in the Linux kernel that provides an interface through which radio transmitters in a computer system can be queried, activated, and deactivated. When transmitters are deactivated, they can be placed in a state where software can reactive them (a soft block) or where software cannot reactive them (a hard block).
也就是说rfkill是linux的一个子系统,可以用它来激活/取消激活一些WIFI/Bluetooth/3G等设备。
可以使用rfkill block wifi或者rfkill unblock wifi来取消激活和激活wifi.
3. /etc/network/interfaces和/etc/init.d/networking
相关文章
- [Linux]配置网络
- Linux操作系统常用的网络状态查询命令
- Linux删除目录下的文件的10种方法
- linux 监控CPU 内存情况
- linux中合并多个文件内容到一个文件的例子
- Linux下多网卡同网段多IP网络分流设定方法
- 【Linux基础】linux updatedb命令
- Spark修炼之道(基础篇)——Linux大数据开发基础:第十四节:Shell编程入门(六)
- Linux Centos 6.5网络启动不起来Bringing up interface eth0: Error:Connection activation failed:Device not man
- Linux下多网卡同网段多IP网络分流设定方法
- Linux文件类型与文件权限详解(三)
- linux登录系统时shell读取的顺序
- Linux安装docker-compose 1.27.4
- Linux网络配置之虚拟网卡的配置(ubuntu 16.04)案例
- 【Linux 内核 内存管理】munmap 系统调用源码分析 ① ( munmap 系统调用函数执行流程 | munmap 函数源码 | vm_munmap 函数源码 )
- L77.linux命令每日一练 -- 第11章 Linux系统管理命令 -- vmstat和mpstat
- L66.linux命令每日一练 -- 第十章 Linux网络管理命令 -- arp和ip
- L1.linux命令每日一练 -- 第一章 Linux命令行简介
- ubuntu linux 编译 opencv
- Linux命令之curl,可测试网络,可查看cgi报文
- 查看linux系统配置 查询Linux配置
- geo ftp环境变量 export source ~/.bashrc Linux中filezilla下载ftp文件 ftp.ncbi.nlm.nih.gov linux下载 ftp下载geo非原始数
- Linux网络基础设施配置
- Linux 操作系统中进程和线程的概念
- Linux信号掩码(signal mask)详解与相关例程
- Linux上的gitlab日常操作