- Команда info в Linux с примерами
- 10 Commands to Collect System and Hardware Info in Linux
- 1. How to View Linux System Information
- 2. How to View Linux System Hardware Information
- 3. How to View Linux CPU Information
- 4. How to Collect Linux Block Device Information
- 5. How to Print USB Controllers Information
- 6. How to Print PCI Devices Information
- 7. How to Print SCSI Devices Information
- 8. How to Print Information about SATA Devices
- 9. How to Check Linux File System Information
- 10. How to Check Linux Hardware Components Info
- Summary
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- Linux info command
- Description
- Syntax
- Options
- Examples
- Related commands
- info command in Linux with Examples
Команда info в Linux с примерами
Команда info читает документацию в формате info . Это даст подробную информацию для команды по сравнению со страницей руководства. Страницы создаются с помощью инструментов texinfo , благодаря которым он может связываться с другими страницами, создавать меню и удобную навигацию.
Синтаксис:
Параметры:
- -a, -all: он использует все соответствующие руководства.
- -k, –apropos = STRING: поиск STRING во всех индексах всех руководств.
- -d, –directory = DIR: добавляет DIR в INFOPATH.
- -f, –file = MANUAL: указывает руководство для посещения.
- -h, -help: отображает эту справку и завершает работу.
- -n, –node = NODENAME: указывает узлы в первом посещенном Info-файле.
- -o, –output = FILE: вывод выбранных узлов в FILE.
- -O, –show-options, –usage: перейти к узлу параметров командной строки.
- -v, –variable VAR = VALUE: присваивает VALUE инфо-переменной VAR.
- –Version: отображение информации о версии и выход.
- -w, –where, –location: печатать физическое местоположение файла Info.
Примеры:
- -a: он использует все соответствующие руководства и отображает их для определенной команды.
-k: он ищет строку STRING во всех индексах всех руководств, а затем отображает то же самое.
-d: добавляет DIR к INFOPATH, а также отображает то же самое.
-O: перейти к узлу параметров командной строки для конкретной команды и отобразить то же самое.
-w Команда: печатает физическое местоположение файла Info.
Замечания:
- Чтобы проверить страницу руководства команды info, используйте следующую команду:
- Чтобы проверить страницу справки команды info, используйте следующую команду:
Источник
10 Commands to Collect System and Hardware Info in Linux
It is always a good practice to know the hardware components of your Linux system is running on, this helps you to deal with compatibility issues when it comes to installing packages, drivers on your system using yum, dnf, or apt.
10 Commands to Check Hardware and System Information in Linux
Therefore in these tips and tricks series, we shall look at some useful commands that can help you to extract information about your Linux system and hardware components.
1. How to View Linux System Information
To know only the system name, you can use the uname command without any switch that will print system information or the uname -s command will print the kernel name of your system.
To view your network hostname, use the ‘-n’ switch with the uname command as shown.
To get information about kernel-version, use the ‘-v’ switch.
To get the information about your kernel release, use the ‘-r’ switch.
To print your machine hardware name, use the ‘-m’ switch:
All this information can be printed at once by running the ‘uname -a’ command as shown below.
2. How to View Linux System Hardware Information
Here you can use the lshw tool to gather vast information about your hardware components such as cpu, disks, memory, usb controllers, etc.
lshw is a relatively small tool and there are few options that you can use with it while extracting information. The information provided by lshw was gathered from different /proc files.
Note: Do remember that the lshw command is executed by the superuser (root) or sudo user.
To print information about your Linux system hardware, run this command.
You can print a summary of your hardware information by using the -short option.
If you wish to generate output as an html file, you can use the option -html.
Generate Linux Hardware Information in HTML
3. How to View Linux CPU Information
To view information about your CPU, use the lscpu command as it shows information about your CPU architecture such as a number of CPUs, cores, CPU family model, CPU caches, threads, etc from sysfs and /proc/cpuinfo.
4. How to Collect Linux Block Device Information
Block devices are storage devices such as hard disks, flash drives, etc. lsblk command is used to report information about block devices as follows.
If you want to view all block devices on your system then include the -a option.
5. How to Print USB Controllers Information
The lsusb command is used to report information about USB controllers and all the devices that are connected to them.
You can use the -v option to generate detailed information about each USB device.
6. How to Print PCI Devices Information
PCI devices may include usb ports, graphics cards, network adapters, etc. The lspci tool is used to generate information concerning all PCI controllers on your system plus the devices that are connected to them.
To print information about PCI devices run the following command.
Use the -t option to produce output in a tree format.
Use the -v option to produce detailed information about each connected device.
7. How to Print SCSI Devices Information
To view all your scsi/sata devices, use the lsscsi command as follows. If you do not have the lsscsi tool installed, run the following command to install it.
After installation, run the lsscsi command as shown:
Use the -s option to show device sizes.
8. How to Print Information about SATA Devices
You can find some information about sata devices on your system as follows using the hdparm utility. In the example below, I used the block device /dev/sda1 which is the hard disk on my system.
To print information about device geometry in terms of cylinders, heads, sectors, size, and the starting offset of the device, use the -g option.
9. How to Check Linux File System Information
To gather information about file system partitions, you can use the fdisk command. Although the main functionality of the fdisk command is to modify file system partitions, it can also be used to view information about the different partitions on your file system.
You can print partition information as follows. Remember to run the command as a superuser or else you may not see any output.
10. How to Check Linux Hardware Components Info
You can also use the dmidecode utility to extract hardware information by reading data from the DMI tables.
To print information about memory, run this command as a superuser.
To print information about the system, run this command.
To print information about BIOS, run this command.
To print information about the processor, run this command.
Summary
There are many other ways you can use to obtain information about your system hardware components. Most of these commands use files in the /proc directory to extract system information.
Hope you find these tips and tricks useful and remember to post a comment in case you want to add more information to this or if you face any difficulties in using any of the commands. Remember to always stay connected to Tecmint.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Источник
Linux info command
On Unix-like operating systems, the info command reads documentation stored in the info format, developed by the Free Software Foundation.
Description
The info format is similar to that of man, the traditional Unix manual format. Info additionally provides a robust structure for linking pages together, similar to hyperlinks. Info pages are made using the texinfo tools, and can link with other pages, create menus and ease navigation in general.
The default location of info documentation is /usr/share/info.
Syntax
Options
-k, —apropos=STRING | Look up STRING in all indices of all manuals. |
-d, —directory=DIR | Add DIR to INFOPATH. |
—dribble=FILENAME | Remember user keystrokes in FILENAME. |
-f, —file=FILENAME | Specify Info file to visit. |
-h, —help | Display this help and exit. |
—index-search=STRING | Go to node pointed by index entry STRING. |
-n, —node=NODENAME | Specify nodes in first visited Info file. |
-o, —output=FILENAME | Output selected nodes to FILENAME. |
-R, —raw-escapes | Output «raw» ANSI escapes (default). |
—no-raw-escapes | Output escapes as literal text. |
—restore=FILENAME | Read initial keystrokes from FILENAME. |
-O, —show-options, —usage | Go to command-line options node. |
—subnodes | Recursively output menu items. |
—vi-keys | Use vi-like and less-like key bindings. |
—version | Display version information and exit. |
-w, —where, —location | Print physical location of Info file. |
MENU-OPTION, if present, is the menu entry to start from; it is searched for in all ‘dir’ files along INFOPATH. If it is not present, info merges all ‘dir’ files and shows the result. Any remaining arguments are treated as the names of menu items relative to the initial node visited.
For a summary of key bindings, type h within info.
Examples
Start at emacs node from top-level dir.
Start at node with emacs command line options.
Show file ./foo.info, not searching dir,
Shows the top-level info page.
Output all information on the vi command, with any subnodes of information, to the file all-vi-info.txt.
Related commands
man — Display the manual page of a given command.
whatis — Display short manual page descriptions.
Источник
info command in Linux with Examples
infocommand reads documentation in the info format. It will give detailed information for a command when compared with the man page. The pages are made using the texinfo tools because of which it can link with other pages, create menus and easy navigation.
Syntax:
Options:
- -a, –all: It use all matching manuals.
- -k, –apropos=STRING: It look up STRING in all indices of all manuals.
- -d, –directory=DIR: It add DIR to INFOPATH.
- -f, –file=MANUAL: It specify Info manual to visit.
- -h, –help: It display this help and exit.
- -n, –node=NODENAME: It specify nodes in first visited Info file.
- -o, –output=FILE: It output selected nodes to FILE.
- -O, –show-options, –usage: It go to command-line options node.
- -v, –variable VAR=VALUE: It assign VALUE to Info variable VAR.
- –version: It display version information and exit.
- -w, –where, –location: It print physical location of Info file.
Examples:
- -a : It use all matching manuals and display them for a particular command.
-k : It look up STRING in all indices of all manuals and then display the same.
-d : It adds DIR to INFOPATH and also display the same.
-O : It go to command-line options node for a particular command and display the same.
-w Command : It print physical location of Info file.
Note:
- To check for the manual page of info command, use the following command:
- To check the help page of info command, use the following command:
Источник