Linux Overview/Development
- The filesystem hierarchy
- tl;dr how-to guide to commands
- Use
.pam_environment
to set environment variables in a cross-shell manner - thefuck corrects your previous console command
- How to control the proliferation of dotfiles
- (A way-too-big list of tools to make an awesome shell.)
- ip cheat sheat (pdf)
- A check list of things to know about the command line
Development
- direnv - manage environment variables per-project
- fish/xiki - alternative shells
- tmux - remote window management - cheatsheat
Packaging
If you ever want to package something for Linux, Repology covers where.
Web Tools
- crobtab.guru - write cron schedules
- explainshell - explain (long) shell commands
Shell
- Consider an alias like
alias q="ls | grep --color -i"
. - The
history
command (history search
). - Process management: & fg bg jobs kill disown nohup (CTRL+C/Z).
kill -SIGSTOP
andkill -SIGCONT
for pause/resume.pgrep
to search for PID by name.script
to record shell session in file (andcat
orless -R
to view).- From
less
to edit, pressv
. - Use
type -a
notwhich
as the latter is problematic
Alternative Tools
- ncdu (du -smh, df -l)
- nnn - Terminal File Browser
Makefiles
Template:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
## help: This.
.PHONY: help
.DEFAULT: help
help: Makefile
# Find all double comments and treat them as docstrings
@echo "make <command>"
@sed -n 's/^##//p' $<
## watch: Hot-reload web-app server.
.PHONY: watch
watch:
# Build files in case they changed while we were not watching
$(MAKE) build
watchman-make -p '*.py' 'Makefile' 'Dockerfile.web' '.dockerignore' -t build
##
##Run make with VERBOSE=1 for additional output.
$(VERBOSE).SILENT:
# Delete targets on failure
.DELETE_ON_ERROR: