Crostini: handy dandy scripts for VMs and Containers - DennisLfromGA/CBC-Projects GitHub Wiki

If you like you can check out some scripts I wrote for Crostini: termina and containers.

Disclaimer: These scripts mainly just provide some aliases to the full commands so it may not be beneficial to many.

scripts source are in: scripts

Here's how to do it ... ( And like @Jim says: Please read all the words ... ;-)


Part 1 (for VMs) - In your Termina shell session -

1. Sign-in to your account then open a crosh session using:

ctrl+alt+t

2. Get into your Termina shell named 'termina' or 'dev' or whatever you named it:

vmc start termina

- or if it's already started -

vsh termina

3. Then enter this to download, extract and install the files to '/mnt/stateful/lxd_conf':

curl -Ls http://bit.ly/2HAM6TH -o $LXD_CONF/Crostini-extractor.sh && sh $LXD_CONF/Crostini-extractor.sh

4. Your Termina session is now installed and setup.

After following the instructions to 'source' your files with: source /mnt/stateful/lxd_conf/bin/lxc.bashrc

Your environment now has some aliases & stuff to make things a little easier. To see what aliases are defined just run:

al

You can see shortcuts for a lot of often used commands, if you forget or want to look for those with 'lxc' for example just run this:

alf lxc

Important: Each time you start your Termina session you will need to run Step 3 again.


Part 2 (for Containers) - In your Linux container shell, like penguin, xenial, etc. -

1. Get into your Linux container shell like 'penguin', 'xenial' or whatever you named it:

Launch the Terminal app for the default penguin container.

- or use the command-line way for xenial, penguin, etc. -

run_container.sh --container_name=xenial --shell --user=<username>

Substitute the container_name and <username> to match your situation.

2. Then make sure that 'curl' and 'wget' are installed:

sudo apt install curl wget -y

3. Then enter this to download, extract and install the files to your '$HOME' folder:

curl -Ls http://bit.ly/2HAM6TH -o /tmp/Crostini-extractor.sh && sh /tmp/Crostini-extractor.sh

4. Your Linux session is now installed and setup.

After following the instructions to 'source' your files with: source ~/.profile

Your environment now has some aliases & stuff to make things a little easier.

See above for viewing your aliases, etc.


Appendix

Individual files & links if you can't or would rather not use the self-extractor file -

UPDATE: Sorry, all of the 'snip.li' links stopped working. :-(

For your termina vm like 'termina':
  • curl -L# http://snip.li/y318t -o lxc.bashrc
  • curl -L# http://snip.li/aubh -o .lxc.bash_aliases
  • curl -L# http://snip.li/unkaa -o .lxc.termina_aliases
For your container like 'penguin':
  • curl -L# http://snip.li/br9 -o .bashrc
  • curl -L# http://snip.li/ygv7 -o .bash_aliases
  • curl -L# http://snip.li/vuYg -o .bash_profile
  • curl -L# http://snip.li/iclhw -o .profile
  • curl -L# http://snip.li/y5l -o name
For both termina & container:
  • curl -L# http://snip.li/ee2 -o mywanip
  • curl -L# http://snip.li/wubs -o screenfetch
  • curl -L# http://snip.li/zas -o transfer.sh

~Denny

P.S. If you'd like any aliases added or anything you'd like to add to the .bashrc, etc. please let me know.

⚠️ **GitHub.com Fallback** ⚠️