Skip to content

Instantly share code, notes, and snippets.

@luizomf
Created October 31, 2022 01:23
Show Gist options
  • Save luizomf/688c8a48fe007829c120818138ac2317 to your computer and use it in GitHub Desktop.
Save luizomf/688c8a48fe007829c120818138ac2317 to your computer and use it in GitHub Desktop.
Instalação ambiente dev Ubuntu 22 do curso de Python
#!/bin/bash
# Executar comandos a seguir para atualizar os pacotes
sudo apt update -y
sudo apt upgrade -y
# Só o Python
sudo apt install python3.10-full python3.10-dev -y
# Instalar pacotes a seguir
sudo apt install git curl build-essential dkms perl wget -y
sudo apt install gcc make default-libmysqlclient-dev libssl-dev -y
sudo apt install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm \
libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
# Pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
# Seguir instruções do Pyenv
# Baixar e instalar VS Code: https://code.visualstudio.com/download
# Abaixo tudo é opcional
# Instalar e configurar ZSH
sudo apt install zsh -y
chsh -s /bin/zsh
zsh
# Instalar Oh-my-zsh! -> https://ohmyz.sh/
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Instalar Spaceship Prompt
# https://github.com/spaceship-prompt/spaceship-prompt
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
# Mudar ~/.zshrc -> ZSH_THEME="spaceship"
# Instalar Zsh Autosuggestions
# https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Instalar Zsh Syntax Highlighting
# https://github.com/zsh-users/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# Mudar plugins
# plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
# Font optional (https://github.com/pdf/ubuntu-mono-powerline-ttf)
mkdir -p ~/.fonts
git clone https://github.com/pdf/ubuntu-mono-powerline-ttf.git ~/.fonts/ubuntu-mono-powerline-ttf
fc-cache -vf
# REBOOT!!!!!!!!!!!!!!!!!!!!!
@bob-reis
Copy link

bob-reis commented Jul 28, 2023

Atualização 27/07/2023

#!/bin/bash

Executar comandos a seguir para atualizar os pacotes

sudo apt update -y
sudo apt upgrade -y

Só o Python

sudo apt install python3.11-full python3.11-dev -y

Instalar pacotes a seguir

sudo apt install git curl build-essential dkms perl wget -y
sudo apt install gcc make default-libmysqlclient-dev libssl-dev -y
sudo apt install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm \
  libncurses5-dev libncursesw5-dev \
  xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git

Pyenv

curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
Seguir instruções do Pyenv

Baixar e instalar VS Code:

https://code.visualstudio.com/download

Abaixo tudo é opcional

Instalar e configurar ZSH

sudo apt install zsh -y
chsh -s /bin/zsh
zsh

Instalar Oh-my-zsh!

https://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Instalar Spaceship Prompt

https://github.com/spaceship-prompt/spaceship-prompt

git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

Mudar ~/.zshrc

vi ~/.zshrc
Alterar a linha para esta forma -> ZSH_THEME="spaceship"

Instalar Zsh Autosuggestions

https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Instalar Zsh Syntax Highlighting

https://github.com/zsh-users/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Mudar plugins

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

Font optional

(https://github.com/pdf/ubuntu-mono-powerline-ttf)

mkdir -p ~/.fonts
git clone https://github.com/pdf/ubuntu-mono-powerline-ttf.git ~/.fonts/ubuntu-mono-powerline-ttf
fc-cache -vf

Para finalizar

REBOOT seu sistema!

@michaelmdrs
Copy link

Instalação do Dracula for Gnome Terminal

sudo apt-get install dconf-cli

git clone https://github.com/dracula/gnome-terminal

cd gnome-terminal

./install.sh

@Single-heo
Copy link

Muito bom, ainda bem que aproveitei a promoção lá da udemy,

@victoraalm
Copy link

victoraalm commented Oct 3, 2024

Aqui vai a sequência para instalar no Arch Linux (OS: SteamOS Holo x86_64)

Atualizar pacotes
sudo pacman -Syu

Executar comandos a seguir para atualizar os pacotes

sudo pacman -Syu git curl base-devel dkms perl wget
sudo pacman -S gcc make mariadb-clients openssl
sudo pacman -S zlib bzip2 readline sqlite llvm ncurses xz tk libffi xz python-openssl git

Pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash

Instalar VS Code
git clone https://aur.archlinux.org/visual-studio-code-bin.git cd visual-studio-code-bin/ makepkg -si

Abaixo tudo é opcional


Instalar e configurar ZSH

sudo pacman  zsh 
chsh -s /bin/zsh
zsh

Instalar Oh-my-zsh!
https://ohmyz.sh/
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Instalar Spaceship Prompt
https://github.com/spaceship-prompt/spaceship-prompt

git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

Mudar ~/.zshrc
sudo nano ~/.zshrc
Alterar a linha para esta forma -> ZSH_THEME="spaceship"

Instalar Zsh Autosuggestions
https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Instalar Zsh Syntax Highlighting
https://github.com/zsh-users/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Mudar plugins
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

Para finalizar
REBOOT seu sistema!

@coliveira1977
Copy link

.bashrc

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi

Copy link

ghost commented Jan 19, 2025

Olá @luizomf Luiz Otavio. Atualize este o procedimento do ambiente DEV para o Ubuntu 24.04. Por favor.

@Adilson-Reichert-SI
Copy link

fiz essa atualização no Zorin OS 17.3, com alguns ajustes, mas funcionando top.

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