fbpx

Create Shortcut Aliases to Easily Switch Between Chrome OS and ChrUbuntu Linux on a Chromebook


After completing these steps you will be able to switch to ChrUbuntu from Chrome OS by simply entering the command ubuntu in the terminal. You will be able to switch to Chrome OS from ChrUbuntu by entering the command chromeos in the terminal.

1. Install ChrUbuntu using the instructions here or at the one script to rule them all page

2. Boot into Ubuntu and navigate to the Home folder

3. Press ctrl + h

4. Double-click the file .bashrc

5. Scroll to the bottom of the file and add this command:

alias chromeos='sudo cgpt add -i 6 -P 0 -S 0 /dev/sda;sudo reboot'

6. Save the file and close it

7. Open a terminal by selecting Applications > Accessories > Terminal and type chromeos

8. After entering your password (the default password is ‘user’), the computer should reboot into Chrome OS

9. Log in to Chrome OS and press ctrl + alt + → (→ is the forward arrow where the F2 key would normally be)

10. Type chronos and press enter

11. Type

sudo vim .profile

and press enter

in chromeos, after adding the alias the ‘ubuntu’ alias command in terminal didn’t work in chromeos until a hard reboot, then afterwards it did.

OR edit

sudo vim .bashrc

and put the alias there near the bottom with the other aliases – works right away for me.

12. Press the letter a to begin ‘insert mode’

13. Type

alias ubuntu='sudo cgpt add -i 6 -P 5 -S 1 /dev/sda;sudo reboot'

14. Press esc to return to ‘command mode’

15. Press shift + z then shift + z again to save the file and return to the terminal

16. Type exit and press enter

17. Type chronos to log in again and press enter

18. Type ubuntu and press enter

19. The computer should reboot into Ubuntu

Sources: http://www.chromeoslounge.com/cr-48-chrome-notebook/548-easy-way-install-ubuntu-cr-48-a-8.html#post9580 and http://www.chromeoslounge.com/cr-48-chrome-notebook/548-easy-way-install-ubuntu-cr-48-a-9.html#post9711

Note about the Chrome alias, it only works in the developer “chronos” console (/.profile) unless you add instead to ~/.bashrc, and you can name it whatever you want. On the Ubuntu side, another option is to add a desktop icon that runs the cgpt command.


20 responses to “Create Shortcut Aliases to Easily Switch Between Chrome OS and ChrUbuntu Linux on a Chromebook”

  1. Does this work on any distro, or is it only for Chrubuntu?

    How fast is the switch between the two? Is it a Crouton replacement? (Just not as fast as crouton, but the same usefulness)

    • It is for switching to Chrubuntu. The reboot from one into the other takes mere seconds no matter which direction you are going. I have another article here showing how you can have both Chrubuntu and Crouton on your machine at the same time, if you’d like to do a speed comparison. Chrubuntu runs Linux independent from the ChromeOS in its own partition, while Crouton is more like a desktop running on top of the ChromeOS, which is still running while you are in Crouton, and shares the same partition with ChromeOS.

  2. So, noob here. I got to step 8, but the trouble is that it’s just rebooting into ChrUbuntu. At first I thought it was because I had previously set ChrUbuntu to default with
    sudo cgpt add -i 6 -P 5 -S 1 /dev/sda
    But after having a more linux savvy friend take a look, it seems that my cgpt package is just not actually doing anything, and we can’t figure out why. Any ideas?

    • sudo cgpt add -i 6 -P 5 -S 0 /dev/sda isn’t getting you back to ChromeOS?
      Perhaps you need to install cgpt – sudo apt-get install cgpt is the command, I believe.
      Let me know how it goes and if you find out anything!

  3. Hmm, nope:
    E: unable to locate package cgpt

    most cgpt commands result in
    ERROR: cannot open ‘user/bin/cgpt’ (No such file or directory)
    even though
    file /usr/bin/cgpt
    gives some info as if it’s there.

    A friend helped out by doing an apt-get update, but that didn’t change anything either.

    • Just to make sure, are you in the chronos shell or the crosh shell? The chronos shell is what you want (CTRL-ALT-F2) not the crosh shell (CTRL-Alt-T).

      Terry

    • I thought you were trying to get back to Chrubuntu from ChromeOS. In Chrome, the two terminals have different capabilities and command sets. I’m pretty sure cgpt is only in the chronos shell. But as you see from my article, it certainly is where you access the files you want to change to add a shortcut.

      So, if cgpt isn’t working, how are you getting to Chrubuntu at all? (I think we are having a communication problem…)

      If you are trying to get back to ChromeOS, then from Chrubuntu’s terminal use:
      sudo apt-get install cgpt

      That should get it in there. Then make sure -S is a zero for ChromeOS.

      sudo cgpt add -i 6 -P 5 -S 0 /dev/sda:sudo reboot

      That should have you working. If still not, add synaptic and check to see if cgpt is installed from there.

      sudo apt-get install synaptic

      Terry

  4. We figured out my issue – I was still on Ubuntu 12.04, and cgpt is no longer available in the Precise repositories. After updating to 13.04 (13.10 apparently has display issues on the CR-48), I was able to install cgpt and carry on with the instructions. Thanks for the assistance!

    • That’s both good news and bad news! I wonder why they would remove cgpt from the 12.04 repositories??? Well, 12.04 has not worked well for a while now. I am having the best luck with 13.04 myself with all desktop installs I’ve tried.
      Thanks for the update!

  5. Hi, I was copying this formula off another site, I got as far as going into terminal from ubuntu adding chronos password. I tried to as far as alias ubuntu=’sudo cgpt add -i 6 -P 5 -S 1 /dev/sda;sudo reboot’
    But nothing happened after that, Now I cant access ubuntu and when I try and switch between the two using “ctrl/alt and <= i go from the google os to just the terminal.

    can you help please

    • I’m not sure. What model are you working with? Some of the later machines used a different key combo to switch between operating systems.

      I see spaces between the letters and the numerals that should not be there. That could be the problem. It should be:

      sudo cgpt add -i6 -P5 -S1 /dev/sda;sudo reboot

      See if that’s the problem and get back to me!

      Terry

  6. I have a samsung chromebook series 3. I did manage to get into ubuntu last night following instruction on youtube. However I now cant get back into to. I went into Terminal and typed shell but it now states unknown command.

    • If that is one of the ARM processors, all the rules change with those. But the Intel ones use two methods (one involving a CTRL-L or something…)
      Can you run chronos?

  7. Sorry what do you me chronos? you mean chrome os? yes that is working fine. my samsung is the
    arm processor.

    Tony

    • If you CTRL-F2 (right arrow) it takes you to a terminal screen, where you can get into the REAL ChromeOS terminal by typing chronos, if I recall correctly.

      This is a different terminal from the one arrived at by CTRL-ALT-T

      Terry

  8. I tried that it did except the chronos at login. however nothing else seems to work. you I now use( sudo cgpt add -i6 -P5 -S1 /dev/sda;sudo reboot) ?
    The link you set me shows how to install ubuntu and then switch between the two, but i cant switch between the two. what input should I be putting into the terminal.?

    Thanks

    Tony

Leave a Reply

Your email address will not be published. Required fields are marked *

x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security