Docker - SQL Server
Create SQL Server Container
sudo docker run -e 'ACCEPT_EULA=Y' \
-e 'SA_PASSWORD=Asrofil123!' \
-p 1433:1433 \
--name sql2022 \
-d mcr.microsoft.com/mssql/server:2022-latestStart SQL Server Container
sudo docker start sql2022Stop SQL Server Container
sudo docker stop sql2022MySQL Configuration
Credentials:
- Username:
asrofil - Password:
Asrofil123!
Connect to MySQL:
mysql -u asrofil -pSystem Administration
View All Partitions
lsblkConfigure Boot Loader (GRUB)
sudo nano /etc/default/grubAfter editing, update GRUB:
sudo update-grubSwitch PHP Version
sudo update-alternatives --config phpInstall application .deb
sudo apt install <path>Network & Process Management
View Running Applications and Ports
# View all listening ports
sudo ss -tulpn
# Filter specific application (e.g., Apache)
sudo ss -tulpn | grep apache2
# Alternative using netstat
sudo netstat -tulpnView Application Path
which <app_name>
# Examples:
which php
which python3
which nodeMonitor System Resources
# Modern, feature-rich monitor
btop
# Classic process monitor
htop
# Basic process list
topKill Running Process
# Kill by PID
kill -9 <PID>
# Kill by process name
pkill <process_name>
# Example:
kill -9 1234
pkill apache2Get Application Class Name (X11)
xprop | grep WM_CLASS
# Usage: Run command, then click on the windowTmux - Terminal Multiplexer
Session Management
| Command | Description |
|---|---|
tmux ls | List all sessions |
tmux new-session -s <name> | Create new session |
tmux attach -t <name> | Attach to session |
tmux kill-session -t <name> | Kill session |
aqua | Create and run aquarium session (custom alias) |
Key Bindings
Prefix Key: Ctrl+a
Pane Management
| Keybinding | Action |
|---|---|
Ctrl+a then v | Split vertical (left/right) |
Ctrl+a then x | Split horizontal (top/bottom) |
Ctrl+a then q | Close current pane |
Ctrl+a then h/j/k/l | Navigate panes (Vim-style) |
Ctrl+a then H/J/K/L | Resize panes |
Session Management
| Keybinding | Action |
|---|---|
Ctrl+a then s | Switch between sessions |
Ctrl+a then d | Detach from session |
Ctrl+a then $ | Rename current session |
Window Management
| Keybinding | Action |
|---|---|
Ctrl+a then c | Create new window |
Ctrl+a then n | Next window |
Ctrl+a then p | Previous window |
Ctrl+a then w | List windows |
Ctrl+a then , | Rename current window |
Other
| Keybinding | Action |
|---|---|
Ctrl+a then r | Reload tmux config |
Ctrl+a then P | Load preset layout |
Ctrl+a then ? | Show all keybindings |
Custom Aliases
Tmux Aquarium Session
alias aqua='tmux new-session -s aquarium -d && \
tmux send-keys -t aquarium "asciiquarium" C-m && \
tmux attach -t aquarium'Usage:
aqua # Creates and attaches to aquarium sessionQuick Reference
Docker Commands
docker ps # List running containers
docker ps -a # List all containers
docker images # List images
docker logs <container> # View container logs
docker exec -it <container> bash # Enter container shellFile Permissions
chmod +x <file> # Make executable
chmod 755 <file> # rwxr-xr-x
chmod 644 <file> # rw-r--r--Service Management (systemd)
sudo systemctl start <service>
sudo systemctl stop <service>
sudo systemctl restart <service>
sudo systemctl status <service>
sudo systemctl enable <service> # Auto-start on boot
sudo systemctl disable <service>Download file from notion
curl -L -o "Nama_File.drawio" "URL_PANJANG_ITU"
atau
save as > nama_file.drawioTelegram desktop muncul di semua window
Contoh: atur agar jendela dengan kelas tertentu tidak muncul di taskbar
gsettings set org.gnome.shell.app-switcher current-workspace-only trueUpdate artcraft product in my personal repo
cd /home/asrofil/Project/artcraft-workspace/artcraft
./artcraft-syncNotes
- Always backup configurations before editing
- Use
sudofor system-level operations - Check service status before making changes
- Document any custom configurations for future reference