What command can provide information to discern if the actual running version has been launched from a live installation on, say, a pen, or a full installation in the hard drive?
3 Answers
You are on live-usb, when command mount
returns:
aufs on / type aufs
and then commands users
and hostname
returns:
ubuntu
You can check the options set for the kernel, which will probably include casper
:
grep -zq casper /proc/cmdline && echo live
You don't even need to execute a command, just open a terminal.
If you are on an installation media you'll see : ubuntu@ubuntu:~$
On a running installed system you'll see : <user>@<hostname>:~$
Here the example from my installed Ubuntu OS : cl@cl-uw-1:~$
-
This might be challenging if full installation has the name ubuntu and a user named ubuntu. Feb 21, 2017 at 16:23
-
@atayenel : hahaha ... yes indeed ... when you choose the name ubuntu as user and host for the installed system, then of course you won't see a difference and no command can't help and won't change a thing. :) Feb 21, 2017 at 16:30