未加星标

Simple Linux commands to get information from your system.

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二04 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

Get your Internet routable IP address with the command line.

[[email protected] ~]$ curl 'https://api.ipify.org' ; echo ~]$ curl 'https://api.ipify.org' ; echo

Get the startup time of your linux PC with Systemd.

[[email protected] ~]$ systemd-analyze Startup finished in 1.186s (kernel) + 9.653s (initrd) + 2min 37.144s (userspace) = 2min 47.984s ~]$ systemd-analyze Startup finished in 1.186s (kernel) + 9.653s (initrd) + 2min 37.144s (userspace) = 2min 47.984s

Get a listing of hardware installed in your Linux machine, this is very easy to do, with this command.

[[email protected] jason]# lspci 00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06) 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 05) 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05) 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05) 00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5) 00:1c.3 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d5) 00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5) 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05) 00:1f.0 ISA bridge: Intel Corporation B85 Express LPC Controller (rev 05) 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05) 02:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04) 03:00.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10) 04:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 740] (rev a1) 04:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1) jason]# lspci 00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06) 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 05) 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05) 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05) 00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5) 00:1c.3 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d5) 00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5) 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05) 00:1f.0 ISA bridge: Intel Corporation B85 Express LPC Controller (rev 05) 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05) 02:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04) 03:00.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10) 04:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 740] (rev a1) 04:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)

Get the make and model of your motherboard with Linux.

[[email protected] jason]# dmidecode --type 02 jason]# dmidecode --type 02

This dmidecode command line will print information about your CPU.

[[email protected] jason]# dmidecode --type 04 jason]# dmidecode --type 04

Get comprehensive BIOS information. Good to know my BIOS still supports a 5.25″ floppy drive.

[[email protected] jason]# dmidecode --type 08 # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: American Megatrends Inc. Version: P1.90 Release Date: 12/06/2013 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 8192 kB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported BIOS ROM is socketed EDD is supported 5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) Printer services are supported (int 17h) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 4.6 jason]# dmidecode --type 08 # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: American Megatrends Inc. Version: P1.90 Release Date: 12/06/2013 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 8192 kB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported BIOS ROM is socketed EDD is supported 5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) Printer services are supported (int 17h) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 4.6

List all connected USB hardware with the lsusb command.

[[email protected] jason]# lsusb Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 007: ID 10f5:0231 Turtle Beach Bus 003 Device 004: ID 2109:0715 VIA Labs, Inc. Bus 003 Device 003: ID 046d:c215 Logitech, Inc. Extreme 3D Pro Bus 003 Device 006: ID e0ff:0005 Bus 003 Device 002: ID 046d:c248 Logitech, Inc. G105 Gaming Keyboard Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub jason]# lsusb Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 007: ID 10f5:0231 Turtle Beach Bus 003 Device 004: ID 2109:0715 VIA Labs, Inc. Bus 003 Device 003: ID 046d:c215 Logitech, Inc. Extreme 3D Pro Bus 003 Device 006: ID e0ff:0005 Bus 003 Device 002: ID 046d:c248 Logitech, Inc. G105 Gaming Keyboard Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: LinuxInc.CPU
分页:12
转载请注明
本文标题:Simple Linux commands to get information from your system.
本站链接:http://www.codesec.net/view/561362.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(22)