Development environment setup script for the 42 Gyeongsan Ubuntu cluster environment.
This repository automates:
- goinfre cache setup
- npm cache setup
- GitHub SSH preparation
- lazygit installation
- wget installation attempt
- VSCode tar.gz download
- desktop entry registration
- zsh configuration
It also includes an automatic startup script for Ubuntu login sessions.
Automatically prepares:
/goinfre/$USERcache-related directories.
Applied targets:
~/.cache~/.npm/_cacache~/.npm/_logs~/.npm/_npx
This reduces HOME storage usage after 42 resets.
Automatically:
- creates SSH key if missing
- sets correct permissions
- exports public key into:
ssh_keyThis file can be copied directly into GitHub SSH settings.
Installs latest lazygit locally without sudo:
~/.local/bin/lazygitAdds:
alias lg="lazygit"to .zshrc.
Downloads VSCode tar.gz into:
~/Documents/code-linux-x64.tar.gzAutomatically copies:
code-portable.desktopinto:
~/.local/share/applicationsThis allows VSCode Portable to appear in Ubuntu application search.
The repository also includes an automatic startup script:
~/scripts/lang.shThis script automatically:
- starts ibus-daemon
- restores brightness
- prepares goinfre cache
- extracts VSCode Portable if missing
42-dev-setup/
├── setup_42.sh
├── README.md
├── code-portable.desktop
├── ssh_key
└── scripts/
Clone repository:
git clone git@github.com:Sunbear95/42-dev-setup.git
cd 42-dev-setupGive execute permission:
chmod +x setup_42.shRun setup:
./setup_42.sh
source ~/.zshrcDisplay public key:
cat ssh_keyGitHub path:
GitHub
→ Settings
→ SSH and GPG keys
→ New SSH key
Paste the contents of:
ssh_keyinto GitHub.
ssh -T git@github.comExpected output:
Hi Sunbear95! You've successfully authenticated...
Inside a git repository:
lgUbuntu:
Startup Applications Preferences
Add:
Name:
42 Startup Script
Command:
/home/jyoo/scripts/lang.sh
Do NOT upload:
~/.ssh/id_ed25519
tokens
.env
private keys
This setup is intended for:
- 42 Gyeongsan
- Ubuntu/Linux
- HOME reset recovery
- goinfre optimization
42 경산 Ubuntu 클러스터 환경용 개발 환경 자동화 스크립트입니다.
이 저장소는 다음 작업들을 자동화합니다.
- goinfre cache 설정
- npm cache 설정
- GitHub SSH 준비
- lazygit 설치
- wget 설치 시도
- VSCode tar.gz 다운로드
- desktop entry 등록
- zsh 설정
또한 Ubuntu 로그인 시 자동 실행되는 startup script도 포함합니다.
다음 cache 디렉토리들을 준비합니다.
/goinfre/$USER적용 대상:
~/.cache~/.npm/_cacache~/.npm/_logs~/.npm/_npx
42 HOME 리셋 이후 용량 문제를 줄일 수 있습니다.
자동으로:
- SSH 키 생성
- 권한 설정
- 공개키를:
ssh_key파일로 저장
합니다.
GitHub 등록 시 이 파일 내용을 그대로 복사하면 됩니다.
sudo 없이 최신 lazygit을 설치합니다.
설치 위치:
~/.local/bin/lazygit추가 설정:
alias lg="lazygit"다음 위치에:
~/Documents/code-linux-x64.tar.gzVSCode tar.gz 파일을 다운로드합니다.
자동으로:
code-portable.desktop파일을:
~/.local/share/applications로 복사합니다.
Ubuntu 앱 검색에서 VSCode Portable을 실행할 수 있게 됩니다.
다음 자동 실행 스크립트가 포함되어 있습니다.
~/scripts/lang.sh이 스크립트는 자동으로:
- ibus-daemon 실행
- 화면 밝기 복구
- goinfre cache 준비
- VSCode Portable 압축 해제
를 수행합니다.
42-dev-setup/
├── setup_42.sh
├── README.md
├── code-portable.desktop
├── ssh_key
└── scripts/
저장소 clone:
git clone git@github.com:Sunbear95/42-dev-setup.git
cd 42-dev-setup실행 권한 부여:
chmod +x setup_42.sh스크립트 실행:
./setup_42.sh
source ~/.zshrc공개키 확인:
cat ssh_keyGitHub 경로:
GitHub
→ Settings
→ SSH and GPG keys
→ New SSH key
ssh_key 파일 내용을 붙여넣기 하면 됩니다.
ssh -T git@github.com정상 결과:
Hi Sunbear95! You've successfully authenticated...
Git 레포 안에서:
lg실행 확인.
Ubuntu에서:
Startup Applications Preferences
검색 후 실행.
추가:
Name:
42 Startup Script
Command:
/home/jyoo/scripts/lang.sh
절대 업로드하지 마세요:
~/.ssh/id_ed25519
토큰
.env
개인 키
이 세팅은 다음 환경을 기준으로 제작되었습니다.
- 42 경산
- Ubuntu/Linux
- HOME 리셋 대응
- goinfre 최적화