Skip to main content

Efficiency Tips

Speed up your DS01 workflow with keyboard shortcuts and workflow optimizations.


Keyboard Shortcuts

Inside Containers

ShortcutAction
Ctrl+DExit container (same as exit)
Ctrl+CCancel current command
Ctrl+ZSuspend current process
Ctrl+LClear terminal
Ctrl+RSearch command history

Terminal Navigation

ShortcutAction
Ctrl+AJump to line start
Ctrl+EJump to line end
Ctrl+WDelete word backward
Ctrl+UDelete to line start
Ctrl+KDelete to line end
Alt+BMove word backward
Alt+FMove word forward

Tmux (if using)

ShortcutAction
Ctrl+B DDetach session
Ctrl+B CNew window
Ctrl+B NNext window
Ctrl+B PPrevious window
Ctrl+B %Split vertical
Ctrl+B "Split horizontal

Command History

Search History

# Search backward
Ctrl+R
# Type partial command, press Ctrl+R again for older matches

# Search forward (after Ctrl+R)
Ctrl+S

History Shortcuts

!! # Repeat last command
!$ # Last argument of previous command
!* # All arguments of previous command
!-2 # Run command 2 back
!container # Run last command starting with "container"

Examples:

container-deploy my-thesis
container-attach !$ # Uses "my-thesis"

vim ~/workspace/project/train.py
python !$ # Runs the same file

Tab Completion

DS01 commands support tab completion:

container-<TAB>
# Shows: container-create container-start container-stop ...

container-deploy my-<TAB>
# Completes project name if unique

Time-Saving Patterns

Pattern 1: Quick Restart

# Restart container (retire + deploy)
container retire my-project --force && container deploy my-project --open

Pattern 2: Image Rebuild Cycle

# Interactive: Use GUI to add packages then recreate
image-update && container retire my-project --force && container deploy my-project --open

# Advanced: Manual Dockerfile edit, rebuild, recreate
vim ~/workspace/my-project/Dockerfile
image-update my-project --rebuild && container retire my-project --force && container deploy my-project --open

Pattern 3: Multi-Container Cleanup

# Remove all stopped containers
container-list --all | grep stopped | awk '{print $1}' | xargs -I {} container-remove {} --force

Environment Customisation

Bashrc Additions

Add to ~/.bashrc:

# DS01 status on prompt (optional)
export PS1='[\u@ds01 \W]$ '

# Quick project navigation
alias cdw='cd ~/workspace'
alias cdp='cd ~/workspace/$(ls ~/workspace | fzf)' # requires fzf

Container Environment

Add to your Dockerfile:

# Useful aliases inside container
RUN echo 'alias ll="ls -la"' >> ~/.bashrc
RUN echo 'alias ..="cd .."' >> ~/.bashrc

Many others possible - depends on your workflow


Next Steps