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 Answers3

4

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

aufs on / type aufs

and then commands users and hostname returns:

ubuntu
Leder
  • 283
2

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

grep -zq casper /proc/cmdline && echo live
muru
  • 197,895
  • 55
  • 485
  • 740
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:~$

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
  • This might be challenging if full installation has the name ubuntu and a user named ubuntu. – atakanyenel Feb 21 '17 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 '17 at 16:30