You can run uptime or w command on your Linux, *BSD, macOS and Unix machine to know how long the system has been running. Examples:
uptime
uptime -p # pretty
uptime -s # system up since
w
For more info see: Linux Server Uptime Command To Find Out How Long The System Has Been Running
You may get this warning on your macOS Unix desktop when try to ssh into remote Linux/Unix server:
warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
See how to fix it: OS X Terminal: -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory Fix