Skip to content

symmetryninja/linux_profile

Repository files navigation

Some hacks to make linuxing easier

This repo contains a basic set of linux commands injected into a user profile. The hacks/tools are features that I always end up doing manually, all the time, in all the profiles, in all the VMS so I put it all in one place to make things easier.

This works for linux VM's but is also useful for linux machines and PI's, some of the hacks in here are especially useful running ROS2.

Ubuntu

Removing stuff that I don't need

sudo apt remove --purge -y libreoffice* thunderbird
sudo apt clean && sudo apt autoremove

some more space reduction stuff here

Packages I need

#  update
sudo apt update
sudo apt upgrade -y

# packages i normally use
sudo apt install -y net-tools ssh btop htop vim iftop curl git gcc make \
    build-essential libssl-dev zlib1g-dev libbz2-dev screen tmux \
    libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
    xz-utils tk-dev libffi-dev liblzma-dev

Profile helpers, including the ros bit

ln -sf ~/linux_profile/.vimrc ~/.vimrc
ln -sf ~/linux_profile/.editorconfig ~/.editorconfig
ln -sf ~/linux_profile/.tmux.conf ~/.tmux.conf

echo 'source ~/linux_profile/profile.sh humble' >> ~/.bashrc
# the 'humble' bit is to source in the ROS bash file
# it works for whatever the ROS folder is called - this could be done more elegantly
source ~/.bashrc

More details about ROS helpers here

Git

git config --global user.email "[email protected]"
git config --global user.name "your name"
git config --global push.autoSetupRemote true
git config --global pull.rebase true

ssh autostart

sudo systemctl enable ssh
sudo systemctl start ssh

Add sudoers to Sudoers as nopasswd

%sudo   ALL=NOPASSWD: ALL

pyenv

pyenv from here

check the script is sane and then:

curl https://pyenv.run | bash

Then install something python'y

pyenv install 3.13
pyenv global 3.13

#this assumes you're importing the profile.sh in your .bashrc
sb

AWS CLI Version 2

For x86_64

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

For ARM_64

curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Details from here

License

I like beer, so buy me a beer if you want and I'm not responsible for how you use this code.

/* 
 * — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — 
 * “THE BEER-WARE LICENSE” (Revision 42):
 * <Spidey> wrote this file. As long as you retain this  
 * notice you can do whatever you want with this stuff. If we meet
 * some day, and you think this stuff is worth it, you can buy me
 * a beer in return.
 * — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — 
 * Amendment 1: The author(s) of this code accept absolutely no 
 * liability for any damage or general bad things that may come as 
 * part of its use. Any use of this software is deemed an agreement 
 * to absolve the author(s) of any liability, culpability, 
 * durability and any other “(*)ability” (good or bad).
 */

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published