Linux shell command uname All In One
Linux shell command uname All In One
$ uname -a
# Darwin xgqfrms-mbp.local 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 PST 2022; root:xnu-8020.101.4~2/RELEASE_X86_64 x86_64
$ man uname
UNAME(1) General Commands Manual UNAME(1)
NAME
uname – display information about the system
SYNOPSIS
uname [-amnoprsv]
DESCRIPTION
The uname command writes the name of the operating system implementation to standard output. When options are specified, strings representing one or more system
characteristics are written to standard output.
The options are as follows:
-a Behave as though the options -m, -n, -r, -s, and -v were specified.
-m Write the type of the current hardware platform to standard output. (make(1) uses it to set the MACHINE variable.)
-n Write the name of the system to standard output.
-o This is a synonym for the -s option, for compatibility with other systems.
-p Write the type of the machine processor architecture to standard output. (make(1) uses it to set the MACHINE_ARCH variable.)
-r Write the current release level of the operating system to standard output.
-s Write the name of the operating system implementation to standard output.
-v Write the version level of this release of the operating system to standard output.
If the -a flag is specified, or multiple flags are specified, all output is written on a single line, separated by spaces.
ENVIRONMENT
An environment variable composed of the string UNAME_ followed by any flag to the uname utility (except for -a) will allow the corresponding data to be set to the
contents of the environment variable.
The -m, -n, -r, -s, and -v variables additionally have long aliases that have historically been honored on MacOS, “UNAME_MACHINE”, “UNAME_NODENAME”, “UNAME_RELEASE”,
“UNAME_SYSNAME”, and “UNAME_VERSION” respectively. These names have a higher priority than their shorter counterparts described in the previous paragraph.
See uname(3) for more information.
EXIT STATUS
The uname utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
The hardware platform (-m) can be different from the machine's processor architecture (-p), e.g., on 64-bit PowerPC, -m would return powerpc and -p would return
powerpc64.
SEE ALSO
hostname(1), machine(1), sw_vers(1), sysctl(3), uname(3), sysctl(8)
STANDARDS
The uname command is expected to conform to the IEEE Std 1003.2 (“POSIX.2”) specification.
HISTORY
The uname command appeared in PWB UNIX 1.0, however 4.4BSD was the first Berkeley release with the uname command.
The -K and -U extension flags appeared in FreeBSD 10.0. The -b extension flag appeared in FreeBSD 13.0.
macOS 13.1 November 13, 2020 macOS 13.1
uname
$ uname [OPTIONS]...
# print all
$ uname -a
$ uname --all
The options are as follows:
-s, (--kernel-name) - Prints the kernel name.
-n, (--nodename) - Prints the system’s node name (hostname). This is the name the system uses when communicating over the network. When used with the -n option, uname produces the same output as the hostname command.
-r, (--kernel-release) - Prints the kernel release.
-v, (--kernel-version) - Prints the kernel version.
-m, (--machine) - Prints the name of the machine’s hardware name.
-p, (--processor) - Prints the architecture of the processor.
-i, (--hardware-platform) - Prints the hardware platform.
-o, (--operating-system) - Print the name of the operating system. On Linux systems that is “GNU/Linux”
-a, (--all) - When the -a option is used, uname behaves the same as if the -snrvmo options have been given.
https://linuxize.com/post/uname-command-in-linux/
https://www.geeksforgeeks.org/uname-command-in-linux-with-examples/
https://linuxhint.com/linux-uname-command-tutorial/
https://linuxopsys.com/topics/uname-command-in-linux
https://www.ibm.com/docs/en/aix/7.2?topic=u-uname-command
https://docs.oracle.com/cd/E19504-01/802-5750/6i9g464r0/index.html
DNS tools
# nslookup
$ nslookup www.google.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: www.google.com
Address: 142.250.204.132
# dig
$ dig www.google.com
; <<>> DiG 9.10.6 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43210
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
www.google.com. 299 IN A 142.250.204.132
;; Query time: 66 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Aug 17 15:17:09 CST 2022
;; MSG SIZE rcvd: 59
https://linuxjourney.com/lesson/dns-tools
https://linuxjourney.com/lesson/kernel-installation
refs
https://github.com/angular/angular-cli/issues/18667
https://github.com/xgqfrms/RAIO/issues/242
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/16595295.html
未经授权禁止转载,违者必究!