What is uname in linux

What is Uname Command in Linux

The uname command in Linux displays the system’s basic information. All the Linux distributions are more convenient to manage using the distribution terminal. Though some Linux distributions support the Desktop environment, instead of Linux, users prefer to manage the operating system by running commands.

There are various commands in Linux used for different applications, but in this blog, the explanation of the uname command in Linux will be explored. The post’s content is as follows:

  • What is the uname Command on Linux?
  • How to Use uname in the terminal?
  • Example 1: Display All the System Information
  • Example 2: Display the Kernel
  • Example 3: Display Only the Hostname
  • Example 4: Display the Kernel Version
  • Example 5: Display the Machine Hardware
  • Example 6: Display the OS Name

What is the uname Command in Linux?

In Linux, if you are interested in displaying and finding out the basic information of the computer, operating system, kernel, and hostname, then it is recommended to use the uname command.

The general syntax of using the uname command is:

The general syntax is easy to understand as type the “uname” command with its different options. The options which can be used with the uname command are explained one by one in the next sections of this blog.

How to Display the Installed Version of uname Command in Linux?

To display the installed version of the uname command in Linux, use the “–version” option with the uname command:

The version of the installed uname utility has been displayed.

How to Open the help menu of the uname command Utility in Linux?

If you need more information about the uname command, the “–help” option of the uname command can be used:

The help command has been displayed.

How to Use the uname Command in Linux?

The working can be understood from the basic syntax described in the above section. Let’s practically implement the uname commands with their various options.

Example 1: Display All the System Information

All the information about the computer and its operating system can be displayed with the uname command using the “-a” option. For example, execute the command:

All basic information of the machine has been displayed.

Читайте также:  Oracle database with linux

Example 2: Display the Kernel

To display only the Kernel name with the uname command, use the “-s” option below:

The Kernal of the machine has been displayed.

Example 3: Display Only the Hostname

Hostname is the name by which the computer is identified in the local network. To display the hostname with the uname command, run the command:

The hostname “ubuntu” has been displayed.

Example 4: Display the Kernel Version

There are different kernel versions. To find out which version we are using on Linux, use the “-v” option with the uname command:

The version of the installed kernel has been displayed.

Example 5: Display the Machine Hardware

Machine name is the computer’s hardware, which can be displayed using the “-m” option with the uname command:

The hardware name has been shown; similarly, if we want to display the processor information of the machine, use the “-p” option:

The processor type, “x86_64” is being installed in our computer.

Example 6: Display the OS Name

To display the installed operating system, use the “-o” option with the uname command:

Linux has been installed, which is displayed on the screen.

That’s all about the uname command.

Conclusion

The uname command is used in Linux to display the basic information of the computer, including kernel name, hostname, kernel version, and processor type. The uname utility has some built-in options that serve all the above-stated functionalities. In this blog, the uname command has been explained in detail with its usage in Linux.

Источник

Команда Uname в Linux

uname — это утилита командной строки, которая выводит основную информацию об имени операционной системы и аппаратном обеспечении системы.

команда uname

Инструмент uname обычно используется для определения архитектуры процессора, имени хоста системы и версии ядра, работающего в системе.

Синтаксис команды uname имеет следующий вид:

Возможны следующие варианты:

  • -s , ( —kernel-name ) — печатает имя ядра.
  • -n , ( —nodename ) — печатает имя узла системы (имя хоста). Это имя, которое система использует при обмене данными по сети. При использовании с параметром -n uname дает тот же результат, что и команда hostname .
  • -r , ( —kernel-release ) — печатает версию ядра.
  • -v , ( —kernel-version ) — —kernel-version ядра.
  • -m , ( —machine ) — печатает имя аппаратного имени машины.
  • -p , ( —processor ) — печатает архитектуру процессора.
  • -i , ( —hardware-platform ) — печатает аппаратную платформу.
  • -o , ( —operating-system ) — —operating-system имя операционной системы. В системах Linux это «GNU / Linux»
  • -a , ( —all ) — При использовании параметра -a uname ведет себя так же, как если бы были заданы параметры -snrvmo .

При вызове без каких-либо параметров uname выводит имя ядра, как если бы была указана опция -s :

Как вы уже знаете, имя ядра — «Linux»:

Вам не нужно запоминать все параметры командной строки. Обычно команда uname используется с параметром -a для вывода всей доступной информации:

Linux dev.linuxize.com 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux 

Вывод включает следующую информацию:

  • Linux — имя ядра.
  • dev.linuxize.com — Имя хоста.
  • 4.19.0-6-amd64 Релиз ядра.
  • #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) — Версия ядра.
  • x86_64 — Имя оборудования компьютера.
  • GNU/Linux — Название операционной системы.

Параметры можно комбинировать друг с другом для получения желаемого результата. Например, чтобы узнать, какая версия ядра Linux работает в вашей системе, вы должны ввести следующую команду:

Читайте также:  Операционная система linux инсталляция

При использовании нескольких параметров информация, содержащаяся в выводе, находится в том же порядке, что и параметр -a . Положение данных опций не имеет значения. И uname -msr и uname -srm дают одинаковый результат.

Выводы

Команда uname используется для печати основной системной информации. Обычно он вызывается с параметром -a для отображения всей доступной информации.

Если у вас есть какие-либо вопросы или отзывы, не стесняйтесь оставлять комментарии.

Источник

What is uname in linux

NAME

uname - print system information

SYNOPSIS

DESCRIPTION

Print certain system information. With no OPTION, same as -s. -a, --all print all information, in the following order, except omit -p and -i if unknown: -s, --kernel-name print the kernel name -n, --nodename print the network node hostname -r, --kernel-release print the kernel release -v, --kernel-version print the kernel version -m, --machine print the machine hardware name -p, --processor print the processor type or "unknown" -i, --hardware-platform print the hardware platform or "unknown" -o, --operating-system print the operating system --help display this help and exit --version output version information and exit

AUTHOR

Written by David MacKenzie.

REPORTING BUGS

Report uname bugs to bug-coreutils@gnu.org GNU coreutils home page: http://www.gnu.org/software/coreutils/> General help using GNU software: http://www.gnu.org/gethelp/> Report uname translation bugs to http://translationproject.org/team/>
Copyright © 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

arch(1), uname(2) The full documentation for uname is maintained as a Texinfo manual. If the info and uname programs are properly installed at your site, the command info coreutils 'uname invocation' should give you access to the complete manual.

© 2019 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.

Источник

Uname Command in Linux

The uname command is used to print basic system information. It is usually invoked with the -a option to display all available information. If you have any questions or feedback, feel free to leave a comment.

  1. What is the use of uname command?
  2. What is the command to check Uname in Linux?
  3. How does Uname work?
  4. How do I change Uname in Linux?
  5. What does Uname mean in Linux?
  6. What is TTY in Linux command?
  7. Who am I command-line?
  8. Where is Nodename in Linux?
  9. How do I find the Linux OS version?
  10. Where is Uname stored?
  11. How do I change Uname?
  12. Is Uname a system call?

What is the use of uname command?

How to Display General System Information ( uname ) To display system information, use the uname command. Displays the operating system name as well as the system node name, operating system release, operating system version, hardware name, and processor type.

What is the command to check Uname in Linux?

To check the Kernel release version just use the uname Linux command with argument -r. Here my Kernel version is 2.6. 32-431.
.
“uname” Command Examples to Check UNIX/Linux Version.

Option Description
-a Displays all information
-s Displays the kernel name
-n Displays the network node (a.k.a. the host name)

How does Uname work?

uname uses the system call uname(2) to get the kernel related information it shows. . h> int uname(struct utsname *buf); where uname(2) returns information in the structure pointed to by buf . Also you can read the header file utsname.

Читайте также:  Vpn server linux debian

How do I change Uname in Linux?

  1. Log in as root.
  2. Modify the system name using the command: uname -S newname. .
  3. Relink the kernel by entering: ./link_unix. .
  4. Run mkdev mmdf and change the host name at the top of the window.
  5. If you have SCO TCP/IP installed and configured, make these changes:

What does Uname mean in Linux?

uname (short for unix name) is a computer program in Unix and Unix-like computer operating systems that prints the name, version and other details about the current machine and the operating system running on it.

What is TTY in Linux command?

The tty command of terminal basically prints the file name of the terminal connected to standard input. tty is short of teletype, but popularly known as a terminal it allows you to interact with the system by passing on the data (you input) to the system, and displaying the output produced by the system.

Who am I command-line?

whoami command is used both in Unix Operating System and as well as in Windows Operating System. It is basically the concatenation of the strings “who”,”am”,”i” as whoami. It displays the username of the current user when this command is invoked. It is similar as running the id command with the options -un.

Where is Nodename in Linux?

  1. -s , ( —kernel-name ) — Prints the kernel name.
  2. -n , ( —nodename ) — Prints the system’s node name (hostname). .
  3. -r , ( —kernel-release ) — Prints the kernel release.
  4. -v , ( —kernel-version ) — Prints the kernel version.
  5. -m , ( —machine ) — Prints the name of the machine’s hardware name.

How do I find the Linux OS version?

  1. Open the terminal application (bash shell)
  2. For remote server login using the ssh: ssh [email protected].
  3. Type any one of the following command to find os name and version in Linux: cat /etc/os-release. lsb_release -a. hostnamectl.
  4. Type the following command to find Linux kernel version: uname -r.

Where is Uname stored?

The uname command retrieved informations are stored in etc/hostname that hostname file contains your machine name.

How do I change Uname?

  1. Log in as root.
  2. Modify the system name using the command: uname -S newname. .
  3. Relink the kernel by entering: ./link_unix. .
  4. Run mkdev mmdf and change the host name at the top of the window.
  5. If you have SCO TCP/IP installed and configured, make these changes:

Is Uname a system call?

This is a system call, and the operating system presumably knows its name, release, and version. It also knows what hardware it runs on. . Some operating systems or libraries use a hardcoded 9 or 33 or 65 or 257.

How to Set Up Apache Virtual Hosts on CentOS 8

Creating

Creating Virtual Hosts for the Apache Web ServerCreate the domain folders. By default, your files are stored in “/var/www/html” on your host. . Crea.

Best Laptop For Word Processing And Excel

Word

The 7 Best Laptops for Excel & Microsoft OfficeLaptop 1: Dell XPS 13 (our favorite!)Laptop 2: Dell XPS 15.Laptop 3: Lenovo ThinkPad X1 Carbon.Lapt.

How to Create Your Own Custom WordPress Shortcodes

Shortcode

In this article, you’ve learned that it only takes three simple steps to create a shortcode:Write a regular function that executes the desired custom .

Latest news, practical advice, detailed reviews and guides. We have everything about the Linux operating system

Источник

Оцените статью
Adblock
detector