Tool.Yun
개발자를 위한 유용한 도구
CSV에서 JSON으로
JSON Escaper/Unescaper
JSON → CSV 변환
JSON → TOML
JSON → YAML 변환기
JSON 린터
JSON 문자열 변환기
JSON 병합
JSON 비교
JSON 정렬 마스터
JSON 최소화
JSON 쿼리
JSON 크기 분석기
JSON 편집기
JSON 포매터
JSON 플래터너/플래터너 해제
JSON에서 C#로
JSON에서 JS로 변환기
JSON에서 Java 엔티티로
JSON에서 PHP 코드로
JSON에서 Python으로
JSON에서 SQL DDL로
JSON에서 TS로
JSON에서 XML로
JSON에서 스키마로
JSON으로 메시지 팩
JSON으로 이동
JSON을 .env 파일로 변환
JSON을 MessagePack으로
JSON을 객체로
JSON을 데이터로
JS에서 JSON으로 변환기
Jq/JSONPath 테스터
Json에서 PHP 배열로
ObjGen을 JSON으로 변환
PHP-배열을 JSON으로
tools.json-patch.name
HTML을 PDF로 변환
PDF 복호화 및 잠금 해제
PDF 서명 검증기
PDF 선형화/FastWeb
PDF 암호화
PDF 압축기
PDF 연결기
PDF 텍스트 추출기
PDF 페이지 추출기
ObjGen을 HTML로 변환
XML 린터
XML 포매터
XML에서 JSON으로
XPath 테스터
XSLT 테스터
YAML → JSON 변환기
YAML → TOML
YAML 포매터
YAML 플래터너/플래터너 해제
YAML 합병
Epub을 Markdown으로 변환
HTML을 마크다운으로
tools.markdown-format-converter.name
마크다운 TOC 생성기
마크다운 로렘 입숨
마크다운 미리보기
마크다운 차이점
마크다운 테이블 생성기
마크다운 테이블 프리티파이어
마크다운 편집기
마크다운에서 HTML로
마크다운으로 붙여넣기
마크다운을 DOCX로
마크다운을 데이터로 변환
마크다운을 텍스트로 변환
ANSI 탈출 테스터
API 테스트
CLI 명령 편집기
CSS/JS 보기 좋게 정리하고 최소화하기
Django 비밀 생성기
GitIgnore 생성기
Gitattributes 생성기
HEX 파일 변환기
JSON에서 SQL INSERT로
JSON에서 Typescript로
Javascript Unobfuscator/Unpacker
Json에서 Protobuf로
K6 부하 테스트 스크립트 생성기
SQL 매개변수 생성기
SQL 미니파이어
SQL 포매터
Swagger UI 테스터
견적 변환기
데이터 위조범
데이터베이스 생성 빌더
데이터베이스 연결 문자열 작성기
데이터베이스 테이블 생성기
메일토 생성기
스택트레이스가 더 예뻐요
스트링 이스케이퍼
오픈그래프 메타 태그 생성기
자바스크립트 난독화 도구
자바스크립트 프리티파이어
컬 컨버터
코드/스크립트 하이라이터
파비콘 생성기
파일 분할기
포모도로 타이머
피코매치 테스터
크론 표현식 빌더
Cron/주중 알람
ETA 계산기
ICAL 생성기
ICAL 파일 파서
TTL 계산기
iCal 합병
기간 계산기
날짜+기간 계산기
날짜·시간 변환기
시간 알람
시간대 변환기
어느 요일?
일 계산기
주 번호 변환기
카운트다운
크로노미터
ARPA 디코더
Apache LogRotate 생성기
BIMI DNS 생성기
Crontab 생성기
DKIM DNS 생성기
DMARC DNS 생성기
DNS 쿼리
DNSBL 검사기
FStab 생성기
HAS 살균제
HDD 계산기
HTAccess 생성기
Htpasswd/htaccess 생성기
IP 서브넷 제외 계산기
IP 지리적 위치
IPRange/CIDR/IPMask의 IPv4-6/IPRange/CIDR
IPv4 범위 계산기
IPv4 서브넷 계산기
IPv4 서브넷 리스터
IPv4 주소 변환기
IPv4/6 CIDR에서 IP 범위 계산기
IPv4/6 범위 대 CIDR 계산기
IPv6 ULA 생성기
IPv6 서브넷 계산기
IPv6 주소 변환기
MAC 주소 변환기
MAC 주소 생성기
MAC 주소 조회
Nginx 포매터
Option43 생성기
PTR DNS 생성기
RAID 계산기
RAID 안정성 계산기
Rsync 생성기
SIP 인증
SPF DNS 생성기
TCP/UDP 포트 테스터
UFW 명령 생성기
WPA PSK 생성기
Whois 검사기
Wireguard 구성 생성기
X-VR-스팸 원인 디코더
ZPOOL RAID 계산기
ZPool 치트시트
Zxcvbn 비밀번호 강도
chmod 계산기
firewalld 명령줄 생성기
iptables 생성기
tools.restic-command-generator.name
tools.url-redirection-checker.name
기본 인증 헤더 생성기
내 IP 주소
데이터 전송 속도 계산기
랜덤 포트 생성기
마이크 테스터
멀티 링크 다운로더
비밀번호 강도 분석기
비주얼 서브넷 계산기
셸 명령 선형화기
셸 명령어 포맷터
웹소켓 테스트
정수를 IPv4/IPv6로 변환
종료 명령 생성기
컬 명령 생성기
클라우드플레어 DNS/RDAP 쿼리
포트 번호
퓨니코드 변환기
핑
동전 던지기
주사위 롤러
카드 피커
행운의 바퀴
BMI 계산기
IBAN 검증·파서
IES 조명 지침
ISBN 검증기 및 파서
ISO 3166 국가 코드 검색기
ISO 639 검색기
Luhn 검증기
RMB 대문자 변환기
SLA 계산기
Shell 명령어를 설명하세요
달력 변환기
달리기 속도 계산기
부가가치세 번호 검증기
소프트웨어 라이선스 호환성
신용카드 확인기
온라인 사전
유니코드 검색
전화번호 파서/포매터
환율 변환기
Docker Compose 검증기
Docker Compose 형식 변환기
Docker Compose를 .env 파일로
Docker Compose를 Quadlet으로
Docker Compose에서 Docker Run으로 변환기
Docker Compose에서 Kubernetes로
Docker Pangolin 레이블
Docker inspect에서 Docker run으로
Dockerfile 레이블 생성기
Docker에서 Kubernetes로 실행
Docker에서 Quadlet으로 실행
Kubernetes RBAC 생성기
Traefik Docker Compose Maker
docker run → docker-compose 변환기
도커 이미지 다운로더
SI 접두사 변환기
가속 변환기
각도 단위 변환기
길이 단위 변환기
면적 단위 변환기
부피 단위 변환기
속도 변환기
식품 에너지 변환기
압력 단위 변환기
에너지 단위 변환기
온도 변환기
전력 변환기
조도 변환기
주파수 변환기
질량 단위 변환기
체적 유량 변환기
피트니스 컴퓨터
힘 단위 변환기
GTIN 검증기
QR 연락처 정보 생성기
QR 코드 디코더
QR 코드 생성기
WiFi QR 코드 생성기
tools.epc-qrcode-generator.name
바코드 리더
바코드 생성기
BIP39 패스프레이즈 생성기
NanoID 생성기
OTP 코드 생성기
UUID 변환기
UUID 생성기
난수 생성기
누메로님 생성기
다이스웨어 비밀번호 생성기
암호문 생성기
토큰 생성기
핀코드 생성기
16진수 인코더/디코더
ActiveDirectory LDAP 속성 검색기
DMARC 보고서 분석기
DNS 전파 테스터
DNS 테스터
EMV TLV 디코더
ETH 거래 디코더
GZip/Deflate 변환기
HTTPS 테스터
MIME 인코딩 변환기
MongoDB ObjectId 변환기
Nmap 명령 빌더
Outlook MSG 파서
Outlook Safelink 디코더
RJ45 Cat6 배선 요약표
SMART 원시 변환기
Sharepoint 공유 URL 디코더
TCPDump 생성기
URL 빌더
URL 파서
键盘测试器
눈송이 ID 추출기
마루 파일 리더
미들 엔디안 변환기
민감한 데이터 마스커
바운스 이메일 파서
부동 소수점 숫자 변환기
불량 화소 테스터
이메일 파서
저항기 계산기
직렬 포트 콘솔
짧은 URL 확장기
쿠키 파서
키코드 정보
텍스트 문자 집합 감지기/디코더
파일 유형 감지기
Base64 16진수 배열 인코더/디코더
Base64 문자열 인코더/디코더
Base64 파일 변환기
CSV를 데이터로
Env 변수 형식 변환기
Excel에서 데이터로
ULID 생성기
dBm mW 변환기
데이터 저장 장치 변환기
로마 숫자 변환기
속성 변환기
에너지 소비 및 비용 컴퓨터
여러 단위 변환기
유니코드 문자를 Java 엔터티로 변환
이메일 정규화
지리적 좌표 변환기
진수 변환기
텍스트 ↔ ASCII 바이너리
텍스트 ↔ 유니코드
토런트에서 자석으로
삼각함수/방정식 곡선 시각화 도구
수식 계산기
수학 OCR
수학 형식 변환기
이진 계산기
팁 계산기
AGE 암호화
Ansible 볼트 암호 해독
Bcrypt
Bech32 인코더/디코더
CRC 계산기
CSR 생성기
ECDSA 키 쌍 생성기
Ed25519 키 쌍 생성기
HMAC 생성기
JWT 생성기
JWT 파서
Jasypt 문자열 암호화
Niceware 바이트를 암호로
PGP 암호화
PGP 키젠
PGP 파일 암호화
RSA 암호화
RSA 키 페어 생성기
RSA/DSA/ECDSA 서명자 및 검증자
SAML 파서
SSL 인증서 변환기
X509 인증서 생성기
샤미르의 비밀 공유
아르곤2 해셔
인증서/키 파서
텍스트 암·복호화
텍스트 해시
파세토/PASERK 공공/민간
파세토/PASERK 로컬
파일 해셔
CSS XPath 변환기
CSS 그래디언트 생성기
CSS 단위 변환기
CSS 프리티파이어
HTML WYSIWYG 편집기
HTML 엔티티 이스케이프
HTML 축소기
HTML 클리너
HTML 프리티파이어
HTML을 XHTML로 변환
HTML을 데이터로 변환
HTTP 상태 코드
MIME 유형 변환기
REM 픽셀 변환기
SVG 플레이스홀더 생성기
URL 인코더/디코더
URL 캐처
URL 클리너
URL 텍스트 검색 조각 생성기
UTM URL 생성기
User-agent 파서
디바이스 정보
문자열 슬러그화
색상 대비 검사기
색상 변환기
색상환
이미지를 CSS로
EXIF 제거
GIF를 MP4로 변환
HEIC 변환기
ICO/PNG 변환기
SVG 미리보기
워터마커
이미지 EXIF/메타데이터/GPS/JPEG 품질 리더
이미지 배경 제거
이미지 비교
이미지 자르기
이미지 컬러 인버터
이미지 크기 조절
이미지 형식 변환기
이미지를 SVG로(potrace)
이미지와 PDF OCR화
카메라 레코더
상환 계산기
백분율 계산기
벤치마크 빌더
종횡비 계산기
지리적 거리 계산기
Bash 치트시트
CSS 선택자 치트시트
Docker Compose 치트시트
Docker SWARM 치트시트
Docker 치트시트
Dockerfile 치트시트
Git 의미적 커밋 치트시트
Git 치트시트
JSONPath 구문 요약
Jq 치트시트
K8s 치트시트
Nginx 치트시트
PowerShell 치트 시트
Sed 치트시트
Tmux 명령어 치트 시트
VIM 치트시트
XPath 구문 요약
Zellij 명령어 치트 시트
chmod 명령어 요약
나노 치트시트
마크다운 치트 시트
일반 정규식 치트시트
정규식 치트시트
화면 명령어 치트 시트
AI 프롬프트 분할기
AI용 팩 파일
ASCII Art로 이미지 변환
ASCII 아트 텍스트 생성기
GPT 토큰 인코더/디코더
GPT 토큰 추정기
HTML에서 텍스트 추출
I 및 L 체커
JSON에서 TOON으로
Lorem ipsum 생성기
NATO 음성 알파벳 변환
RSVP 독자
Sed 명령 생성기
TOON에서 JSON으로
글꼴 비교
대소문자 변환기
뚜렷한 단어들
레벤슈타인 계산기
룬 변환기
리스트 변환기
모스 부호 변환기
목록 비교
무작위 줄 선택기
문자열 난독화
소셜 링크 공유자
스마트 텍스트 교체 및 줄바꿈
유니코드 포매터
유니코드에서 GSM-7로
이모지 선택기
인어 수출업체
인용 생성기
잘고 생성기/배너
정규식 테스터
중복된 줄 찾기
키보드 레이아웃 변환기
탭 키를 눌러 공백으로 이동
텍스트 번역기
텍스트 비교
텍스트 통계
텍스트를 유니코드 이름으로
폴더 구조 다이어그램
TOML → JSON
TOML → YAML
TOML 린터

Bash 치트시트

Bash 일반 명령어

Bash is the default shell on most Linux systems and the language of most glue scripts. This sheet covers the interactive shortcuts, the syntax you forget between scripts, and the safety flags worth putting at the top of every file.

#!/usr/bin/env bash
set -euo pipefail

⌨️ Keyboard Shortcuts

KeysDoes
Ctrl+A / Ctrl+EJump to the start / end of the line
Ctrl+B / Ctrl+FBack / forward one character
Alt+B / Alt+FBack / forward one word
Ctrl+U / Ctrl+KCut to the start / end of the line
Ctrl+WCut the word before the cursor
Alt+DCut the word after the cursor
Ctrl+YPaste back what you last cut
Ctrl+T / Alt+TSwap the last two characters / words
Alt+.Insert the last argument of the previous command
Ctrl+LClear the screen
Ctrl+RSearch the history backwards
Ctrl+GAbort the history search
Ctrl+CInterrupt the running command
Ctrl+DEnd of input — logs out of an empty prompt
Ctrl+ZSuspend the running command
Ctrl+S / Ctrl+QFreeze / resume terminal output
Alt+U / Alt+LUpper-case / lower-case to the end of the word

🕰 History

# the last few hundred commands
history

# run command number 42
!42

# run the last command again, or the last one starting with 'ssh'
!!
!ssh

# the last argument of the previous command — also Alt+.
!$

# every argument of the previous command
!*

# re-run the last command with a substitution
^old^new

# forget a command you would rather not keep
history -d 42

# do not record commands that start with a space, and drop duplicates
export HISTCONTROL=ignoreboth
export HISTSIZE=10000 HISTFILESIZE=20000

📁 Files & Directories

# list: long, human sizes, hidden files, newest last
ls -lhAtr

# tree view of a directory
tree -L 2

# copy, move, delete
cp -r src/ dest/
mv old new
rm -rf directory

# create nested directories in one go
mkdir -p project/{src,test,docs}

# symbolic and hard links
ln -s /path/to/target linkname
ln target hardlink

# where is a file, and what is it?
find . -name '*.log' -mtime -7
find . -type f -size +100M
locate nginx.conf
which python3
type -a ls
file archive.bin
stat report.pdf

# disk usage: this directory, and the filesystem
du -sh *
du -h --max-depth=1 | sort -h
df -h

# archives
tar czf backup.tar.gz directory/
tar xzf backup.tar.gz
zip -r archive.zip directory/
unzip archive.zip

🔎 Text & Search

# grep: recursive, line numbers, case-insensitive
grep -rni "pattern" .

# only the matching part, or only the file names
grep -o 'v[0-9.]*' file
grep -rl "TODO" src/

# invert, count, context
grep -v "debug" app.log
grep -c "error" app.log
grep -B2 -A2 "exception" app.log

# head, tail, follow
head -20 file
tail -f /var/log/syslog

# columns, sorting, counting
cut -d',' -f1,3 data.csv
sort -u names.txt
sort -k2 -n scores.txt
uniq -c sorted.txt
wc -l file

# the classic: what are the top ten IPs in this log?
awk '{print $1}' access.log | sort | uniq -c | sort -rn | head

# replace across many files
sed -i 's/old/new/g' *.conf

# translate or delete characters
tr 'a-z' 'A-Z' < file
tr -d '\r' < dos.txt > unix.txt

# split a stream: to a file and onward down the pipe
command | tee output.log | grep error

# build command lines from input
find . -name '*.py' | xargs wc -l
find . -name '*.tmp' -print0 | xargs -0 rm

🖧 System & Network

# who and where am I
whoami; hostname; uname -a; uptime

# processes
ps aux | grep nginx
pgrep -a node
top
htop

# memory and load
free -h
vmstat 1 5

# what is listening, and what has this file open
ss -tulpn
lsof -i :8080
lsof /var/log/app.log

# connectivity
ping -c 4 example.com
traceroute example.com
dig example.com +short
ip addr show
curl -I https://example.com

# transfer files
scp file user@host:/path/
rsync -avz --progress src/ user@host:/dest/

# remote shell, with a tunnel
ssh user@host
ssh -L 8080:localhost:80 user@host

# services and logs (systemd)
systemctl status nginx
journalctl -u nginx -f --since "1 hour ago"

📦 Variables

# assignment: no spaces around the =
name="value"

# only for this one command
DEBUG=1 ./script.sh

# export to child processes
export PATH="$HOME/bin:$PATH"

# read input from the user
read -p "Name: " name
read -rs -p "Password: " pass

# command substitution
today=$(date +%F)

# arithmetic
count=$(( count + 1 ))
let "n = 5 * 3"

# read-only and integer variables
declare -r VERSION=1.0
declare -i counter=0
VariableHolds
$0The name of the script
$1 … $9Positional arguments
$#How many arguments were passed
$@All arguments, each one quoted separately
$*All arguments as a single word
$?Exit status of the last command
$$PID of the current shell
$!PID of the last background job
$_Last argument of the previous command
$HOME $USER $PWD $OLDPWDThe usual environment
$RANDOMA random integer
$LINENOThe current line number — handy in traps

🔤 Parameter Expansion

ExpansionResult
${var:-default}default when var is unset or empty
${var:=default}The same, and assigns it
${var:?message}Abort with message when unset — great for required arguments
${var:+value}value only when var is set
${#var}The length of the value
${var:offset:length}A substring
${var#pattern}Strip the shortest match from the start
${var##pattern}Strip the longest match from the start — ${path##*/} is basename
${var%pattern}Strip the shortest match from the end — ${file%.txt} drops the extension
${var%%pattern}Strip the longest match from the end
${var/old/new}Replace the first match
${var//old/new}Replace every match
${var^^} / ${var,,}Upper-case / lower-case the whole value
path="/var/log/app.log"
echo "${path##*/}"    # app.log
echo "${path%/*}"     # /var/log
echo "${path%.log}"   # /var/log/app

📚 Arrays

# indexed arrays
fruits=(apple banana cherry)
fruits[3]="date"

echo "${fruits[1]}"       # banana
echo "${fruits[@]}"       # every element
echo "${#fruits[@]}"      # how many elements
echo "${!fruits[@]}"      # the indexes
echo "${fruits[@]:1:2}"   # a slice

for fruit in "${fruits[@]}"; do
  echo "$fruit"
done

# associative arrays (bash 4+)
declare -A color
color[apple]="red"
color[banana]="yellow"

echo "${color[apple]}"
for key in "${!color[@]}"; do
  echo "$key is ${color[$key]}"
done

🧪 Tests & Conditions

Use [[ ... ]] in bash — it handles empty variables and patterns far better than the old [ ... ].

FilesTrue when
-e fileIt exists
-f fileIt exists and is a regular file
-d fileIt exists and is a directory
-L fileIt is a symbolic link
-s fileIt exists and is not empty
-r -w -xYou can read / write / execute it
-O fileYou own it
f1 -nt f2f1 is newer than f2 (-ot for older)
StringsTrue when
-z "$s"The string is empty
-n "$s"The string is not empty
"$a" == "$b"They are equal (= also works)
"$a" != "$b"They differ
"$a" < "$b"Sorts before, in the current locale
"$s" == pre*Glob match — unquoted right-hand side
"$s" =~ ^re$Regex match, captures land in $BASH_REMATCH
NumbersMeaning
-eqEqual
-neNot equal
-ltLess than
-leLess than or equal
-gtGreater than
-geGreater than or equal
if [[ -f "$config" && -r "$config" ]]; then
  echo "readable"
elif [[ -d "$config" ]]; then
  echo "that is a directory"
else
  echo "missing"
fi

# arithmetic comparison reads more naturally in (( ))
if (( count > 10 )); then echo "plenty"; fi

🔀 Flow Control

# for over a list, a glob, or a range
for name in alice bob; do echo "$name"; done
for f in *.log; do gzip "$f"; done
for i in {1..10}; do echo "$i"; done
for (( i = 0; i < 10; i++ )); do echo "$i"; done

# while and until
while read -r line; do echo "$line"; done < input.txt
until ping -c1 host &>/dev/null; do sleep 5; done

# case
case "$1" in
  start)   echo "starting" ;;
  stop)    echo "stopping" ;;
  restart) echo "restarting" ;;
  *)       echo "usage: $0 {start|stop|restart}"; exit 1 ;;
esac

# select builds a numbered menu
select choice in build test deploy; do
  echo "you picked $choice"
  break
done

# loop control
continue   # skip to the next iteration
break      # leave the loop

🧰 Functions

greet() {
  local name="${1:?name required}"
  local greeting="${2:-Hello}"
  echo "$greeting, $name!"
  return 0
}

greet "World"
greet "World" "Good morning"

# capture the output, and check the status
message=$(greet "World")
if ! greet; then echo "greet failed"; fi

# make a function available to subshells
export -f greet

➡️ Redirection

SyntaxDoes
> fileSend stdout to a file, replacing it
>> fileAppend stdout to a file
2> fileSend stderr to a file
2>&1Send stderr wherever stdout is going
&> fileSend both to a file (bash)
> file 2>&1The portable form of the same
< fileRead stdin from a file
<<EOF … EOFHere-document
<<-EOF … EOFHere-document, leading tabs stripped
<<< "string"Here-string
|Pipe stdout into the next command
|&Pipe stdout and stderr
> /dev/null 2>&1Discard everything
<(command)Process substitution — a command as a file
tee fileWrite to a file and pass the stream on
# a heredoc, expanded
cat <<EOF > config.ini
host=$HOSTNAME
port=8080
EOF

# a heredoc, literal (quoted delimiter)
cat <<'EOF' > script.sh
echo "$HOME is not expanded here"
EOF

# compare the output of two commands without temporary files
diff <(sort a.txt) <(sort b.txt)

⚙️ Jobs & Processes

# run in the background, and list the jobs
long_task &
jobs

# bring back to the foreground, or resume in the background
fg %1
bg %1

# Ctrl+Z suspends the foreground job

# survive logout
nohup ./script.sh > out.log 2>&1 &
disown -h %1

# wait for background jobs
wait
wait $!

# signals
kill 1234
kill -9 1234
kill -TERM %1
pkill -f "node server.js"

# give a command a deadline
timeout 30s ./slow_task.sh

# clean up on exit, whatever happens
trap 'rm -f "$tmpfile"' EXIT
trap 'echo interrupted; exit 130' INT TERM

🛡 Safe Scripting

#!/usr/bin/env bash
# -e  exit on any failing command
# -u  treat unset variables as an error
# -o pipefail  a pipeline fails if any stage fails
set -euo pipefail

# make word splitting predictable
IFS=$'\n\t'

# always quote expansions
cp "$src" "$dest"

# check the syntax without running anything
bash -n script.sh

# trace every command as it runs
bash -x script.sh
set -x; risky_command; set +x

# a more informative trace prefix
export PS4='+ ${BASH_SOURCE}:${LINENO}: '

# report where a script died
trap 'echo "failed at line $LINENO with status $?" >&2' ERR

# and lint it before it reaches anyone else
shellcheck script.sh

⚠️ set -e has surprising corners: it does not fire inside if, &&, || or command substitutions used in assignments. It is a seatbelt, not autopilot — still check what matters explicitly.

🎨 Colours

Escape sequences take the form \033[<style>;<colour>m, and \033[0m resets. \e and \x1B are the same character as \033.

ColourForegroundBrightBackground
Black309040
Red319141
Green329242
Yellow339343
Blue349444
Magenta359545
Cyan369646
White379747
StyleCodeStyleCode
Reset0Underline4
Bold1Blink5
Dim2Reverse7
RED='\033[0;31m'
GREEN='\033[0;32m'
BOLD='\033[1m'
RESET='\033[0m'

echo -e "${GREEN}ok${RESET} — ${RED}${BOLD}failed${RESET}"

# only colourise when stdout is a terminal
if [[ -t 1 ]]; then RED='\033[0;31m'; RESET='\033[0m'; else RED=''; RESET=''; fi

💡 Tips

# aliases and functions belong in ~/.bashrc
alias ll='ls -lhA'
alias gs='git status -sb'
mkcd() { mkdir -p "$1" && cd "$1"; }

# reload the config after editing it
source ~/.bashrc

# brace expansion saves a lot of typing
cp config.yaml{,.bak}
mkdir -p src/{components,utils,tests}

# repeat the previous command as root
sudo !!

# go back to the previous directory
cd -

# run something regardless of the current directory
(cd /tmp && ./task.sh)

# time a command, and keep a transcript of a session
time ./build.sh
script session.log

📚 Resources

  • GNU Bash manual
  • ShellCheck — lints your scripts
  • Bash Pitfalls
  • Google Shell Style Guide
  • explainshell — break down any command line