Skip to content

Instantly share code, notes, and snippets.

@rwcitek
Last active April 17, 2023 04:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwcitek/824d4752b417b6d2cd5c931af3db61a6 to your computer and use it in GitHub Desktop.
Save rwcitek/824d4752b417b6d2cd5c931af3db61a6 to your computer and use it in GitHub Desktop.
Configure Linux and Install Docker on a Chromebook
# https://dvillalobos.github.io/2020/How-to-install-and-run-Docker-on-a-Chromebook/
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update --allow-releaseinfo-change
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
lsb-release \
software-properties-common
# old, works
curl -fsSL https://download.docker.com/linux/$( lsb_release -is | tr A-Z a-z )/gpg |
sudo apt-key add -
# new, don't work for me
# curl -fsSL https://download.docker.com/linux/$( lsb_release -is | tr A-Z a-z )/gpg |
# sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$( lsb_release -is | tr A-Z a-z )\
$(lsb_release -cs)\
stable"
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker ${USER}
sudo docker pull ubuntu
sudo docker image list -a
sudo docker run --rm ubuntu echo -e "\n\n===\nHello, world\n===\n\n"
# if I'm too lazy or in too much of a hurry to log out and log back in
exec sudo su - ${USER}
## install familiar packages
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update --allow-releaseinfo-change
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install -y \
awscli \
curl \
elinks \
git \
inxi \
iamerican-insane \
jq \
less \
ncal \
rsync \
ruby \
tidy \
tree \
;
## customize environment
mkdir -p ~/src
cd ~/src
git clone https://github.com/rwcitek/bash_customization.git
cat <<'eof' > ~/.bash_aliases
[ "$SSH_AGENT_PID" ] || exec ssh-agent ${SHELL} -l
ssh-add $( ls ~/.ssh/id* | grep -v pub$ )
for i in $( find ~/src/bash_customization/ -type f -name '*.bash_*' | sort ) ; do
source $i
done
export HISTCONTROL=ignoredups:ignorespace;
export HISTFILESIZE=50000;
export HISTSIZE=50000;
export HISTTIMEFORMAT='%t%F %T%t';
export PAGER='less -iX ';
export IGNOREEOF=20;
export PS1='\u@\h: \w\n\$ ' ;
[ -d ~/bin ] && export PATH=~/bin:${PATH}
eof
## share Downloads and GoogleDrive with linux, then create symlinks
ln -snf /mnt/chromeos/MyFiles/Downloads ~/Downloads
ln -snf /mnt/chromeos/GoogleDrive/MyDrive/ ~/GoogleDrive
ln -snf /mnt/chromeos/removable/ ~/USB
ln -snf /tmp/ ~/tmp
## VSCode setup
### https://code.visualstudio.com/blogs/2020/12/03/chromebook-get-started
### https://az764295.vo.msecnd.net/stable/899d46d82c4c95423fb7e10e68eba52050e30ba3/code_1.63.2-1639562499_amd64.deb
sudo apt-get update
sudo apt-get install -y gnome-keyring
deb=https://az764295.vo.msecnd.net/stable/899d46d82c4c95423fb7e10e68eba52050e30ba3/code_1.63.2-1639562499_amd64.deb
curl -o /tmp/vscode.deb "${deb}"
sudo apt-get install -y /tmp/vscode.deb
sudo apt-get update
sudo apt-get -y --no-install-recommends dist-upgrade
# For fun, wipe ChromeOS and install Ubuntu with chrx
# https://www.pcmag.com/how-to/install-linux-on-your-chromebook
curl -s https://gist.github.com/rwcitek/824d4752b417b6d2cd5c931af3db61a6 |
grep -o '/.*/[r]aw/.*.sh' |
sort -r |
xargs -r -I {} curl -L -s https://gist.githubusercontent.com/{} |
tee /tmp/chromebook.setup.sh |
cat -n
echo source /tmp/chromebook.setup.sh
@Ngbcoder
Copy link

it worked thankks

@rwcitek
Copy link
Author

rwcitek commented Dec 11, 2022

it worked thankks

Glad to hear it worked for you, @Ngbcoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment