Questions tagged [uname]

A command on Unix and Unix-like operating systems that prints out information about the machine and OS.

uname is a command on Unix and Unix-like operating systems that prints out information about the machine and OS.

This tag is used when asking for ways to get information about the machine.

Frequently asked questions

References

53 questions
3
votes
1 answer

Accurately determine the type of OS PHP is running on

I need to determine the type of OS the PHP server is running on. By type, I mean strings like "windows" or "linux", not "wince", "winnt" etc. So far, I have to leads: PHP_OS and uname(), the later being more reliable than the earlier (PHP_OS says…
Christian
  • 27,509
  • 17
  • 111
  • 155
3
votes
2 answers

Error: No module named os.uname under python 2.7

I'm running python 2.7.3 on a system that has anaconda. I recently pip installed internetarchive and when I run the installation program from command line I see: AttributeError: 'module' object has no attribute 'uname' I also tried this from within…
Marc Maxmeister
  • 4,191
  • 4
  • 40
  • 54
3
votes
3 answers

explain uname -a command on linux? How to find vender's name of OS?

I am facing problem to find output the Operating system name and version number on linux system. I hit a command uname -a , but i can't understand the output of this command, can anybody please explain the below output and help me to find the…
Girdhar Singh Rathore
  • 5,030
  • 7
  • 49
  • 67
3
votes
1 answer

What is utsname and systemInfo?

When I found way to get iOS device type (e.g., iPhone 6, iPhone 6 Plus), I found a way to do and it did help but it give me this two question? What is utsname and systemInfo, why we can get the device type through it? Why need the convert like…
Wythe
  • 149
  • 3
  • 12
3
votes
2 answers

How fast is php_uname()?

How fast is php_uname() say doing php_uname('s n') or php_uname('a'). The reason I ask is because I'd like to use it to determine which server I'm on and therefore the configuration (paths, etc). This is related to Is there a PHP function or…
Darryl Hein
  • 142,451
  • 95
  • 218
  • 261
3
votes
1 answer

How to modify the Linux kernel to change the version string that uname returns?

I'm working with an old (2.6.33.2) version of embedded Linux and have been asked to change the kernel so that differently patched kernel images can be told apart. At the moment, uname -v outputs e.g."#1 Wed Sep 11 07:07:51 BST 2013. Hence I'd like…
user1646441
  • 31
  • 1
  • 1
  • 3
2
votes
1 answer

Precisely Why Does uname -m Report the Wrong Architecture When Run By Sun Grid Engine (SGE)?

I have 64-bit Debian Squeeze systems that run an older 32-bit version of SGE execd. When I run uname -m at the command line, I get what I'd expect: x86_64. But when I run uname -m inside an SGE script on the same host, the output is i686. This…
chrishiestand
  • 2,800
  • 1
  • 25
  • 25
2
votes
1 answer

Kernel version doesn't update in uname -r (Arch Linux)

After kernel update, the version of kernel in uname is not updated itself. It is a problem because all the modules are loaded through it, so I had to rename the folder with new modules to the old version (as a temporary solution) but I would like to…
Cuttlerat
  • 23
  • 1
  • 3
2
votes
1 answer

shell uname -s falling into linux instead of darwin

I was looking at makefile returns error and tried OS := $(shell uname -s) ifeq ($(OS),Darwin) #set LIB_DIR LIB_DIR=darwin64_gcc42/lib else LIB_DIR=linux64_gcc44/lib endif but for some reason, it's setting the dir as linux. Any idea why,…
Michele
  • 3,617
  • 12
  • 47
  • 81
2
votes
0 answers

rpm -qi not showing installed kernel version

My OL 6.5 server show below in "rpm -qi": Version : 2.6.32 Release : 431.el6 Source RPM: kernel-2.6.32-431.el6.src.rpm But "uname -a" shows below kernel version: Linux dmdroemoc01 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST…
Arun Krishnan
  • 161
  • 3
  • 8
2
votes
2 answers

Cannot get Uname by golang

I'm using golang 1.4.2 on Mac I want to use Uname to get some information, followings are my codes: package main import ( "syscall" ) func main() { utsname := syscall.Utsname{} syscall.Uname(&utsname) } But I got these errors: #…
waitingkuo
  • 89,478
  • 28
  • 112
  • 118
2
votes
2 answers

How do I interpret the output of php_uname

From the manual I got the information: mode is a single character that defines what information is returned: 'a': This is the default. Contains all modes in the sequence "s n r v m". 's': Operating system name. eg. FreeBSD. 'n': Host…
rubo77
  • 19,527
  • 31
  • 134
  • 226
2
votes
3 answers

Get only part of uname -r in bash

I need to get only first two numbers of "uname -r" command in bash example of regular out put: uname -r 3.5.0-18-generic what I expect using magic bash options: 3.5
Ba7a7chy
  • 1,471
  • 4
  • 14
  • 29
1
vote
1 answer

Why does uname return different current hardware platform in different terminals?

I'm on an M2 Macbook Air, running Apple's ARM-based silicon. I want CLI commands related to building my app for different platforms to work correctly and predictably, whether I run those commands from a standalone terminal like iTerm, or the…
Tom
  • 8,509
  • 7
  • 49
  • 78
1
vote
3 answers

How to change where the uname command searches for uname?

I need help with loading software that has a built-in platform_check script. My plan is to create a script titled uname which when executed will print an accepted platform. The script works as I need it to but I can't figure out how to get the uname…