5

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 3

3

You are on live-usb, when command mount returns:

aufs on / type aufs

and then commands users and hostname returns:

ubuntu
1
  • Oddly enough, for me it was overlayfs
    – muru
    Feb 23, 2017 at 1:33
1

You can check the options set for the kernel, which will probably include casper:

grep -zq casper /proc/cmdline && echo live
1

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:~$

2
  • 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. :)
    – cl-netbox
    Feb 21, 2017 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.