当前位置:首页 » 操作系统 » iplinux查看ip地址

iplinux查看ip地址

发布时间: 2023-12-09 01:19:37

A. linux如何查看本机ip地址

1.修改/etc/profile文件,注释掉if语句即团衫可
把下面的if语句注释掉:
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
修改为
# Path manipulation
# if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
#fi
2.可以使用ln 命令连接悄或亮
下图是操作详细过程
[Blinux@bogon ~]$ ifconfigbash: ifconfig: command not found

[Blinux@bogon ~]$ ln -s /sbin/ifconfig /bin/ifconfigln: 正在创建指向“/sbin/ifconfig”的符号链接“/bin/ifconfig”: 权限启宽不够
[Blinux@bogon ~]$ su
口令:
[root@bogon Blinux]# ln -s /sbin/ifconfig /bin/ifconfig[root@bogon Blinux]# su Blinux[Blinux@bogon ~]$ ifconfigeth0 Link encap:Ethernet HWaddr 00:0C:29:D4:AD:D6
inet addr:192.168.13.132 Bcast:192.168.13.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fed4:add6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:254 errors:0 dropped:0 overruns:0 frame:0
TX packets:193 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:28648 (27.9 KiB) TX bytes:20650 (20.1 KiB)
Interrupt:67 Base address:0x2000

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:16436 Metric:1
RX packets:2471 errors:0 dropped:0 overruns:0 frame:0
TX packets:2471 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4570048 (4.3 MiB) TX bytes:4570048 (4.3 MiB)

3.用su – root方法
[Blinux@bogon ~]$ ifconfig
bash: ifconfig: command not found
[Blinux@bogon ~]$ su - root
口令:
[root@bogon ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:D4:AD:D6
inet addr:192.168.13.132 Bcast:192.168.13.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fed4:add6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:292 errors:0 dropped:0 overruns:0 frame:0
TX packets:228 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32842 (32.0 KiB) TX bytes:24487 (23.9 KiB)
Interrupt:67 Base address:0x2000

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:16436 Metric:1
RX packets:2471 errors:0 dropped:0 overruns:0 frame:0
TX packets:2471 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4570048 (4.3 MiB) TX bytes:4570048 (4.3 MiB)

B. linux查询ip地址命令

具体如下。
ip命令,可以同时显示IPv4和IPv6地址,语法为“ipaddrshow”;hostname命令,可以查看主机名的IP地址,语法为“hostname-I”;
ifconfig命令,燃碧可以查询和配置网络接口卡,唯和语法为“ifconfig-a”;curl命令,是一款强大的http命令行工具,语法为“curlifconfig.me”。
Linux是一种自由和开放源代码的类UNIX操作系统。该操作系统的内核由林纳斯·托瓦兹在1991年10月5日首次发布。在加上用户空间的应用程序之后,成为Linux操作系统。Linux也是自由软件和开放源代码软件发展中最着名的例子。只要遵循GNU通用公共许可证,任何个人和机构都可以自由地使用Linux的所有底层源代码,也可以自由地修改和再发布。大多数Linux系统还包括了像提供GUI界面的XWindow之类的程序。除了一部分专家之外,大多数人都是直接使用Linux发布版,而不是自己皮山举选择每一样组件或自行设置。以后借助于Internet网络,并通过全世界各地计算机爱好者的共同努力,已成为今天世界上使用最多的一种UNIX类操作系统,并且使用人数还在迅猛增长。

热点内容
频率计源码 发布:2024-09-08 07:40:26 浏览:778
奥迪a6哪个配置带后排加热 发布:2024-09-08 07:06:32 浏览:100
linux修改apache端口 发布:2024-09-08 07:05:49 浏览:208
有多少个不同的密码子 发布:2024-09-08 07:00:46 浏览:566
linux搭建mysql服务器配置 发布:2024-09-08 06:50:02 浏览:995
加上www不能访问 发布:2024-09-08 06:39:52 浏览:811
银行支付密码器怎么用 发布:2024-09-08 06:39:52 浏览:513
苹果手机清理浏览器缓存怎么清理缓存 发布:2024-09-08 06:31:32 浏览:554
云服务器的优点与缺点 发布:2024-09-08 06:30:34 浏览:734
上传下载赚钱 发布:2024-09-08 06:14:51 浏览:258