Skip to content

Use sudo

The moltshell user on your VM has passwordless sudo access. You can run any command with root privileges without entering a password.

Installing packages

bash
# Update package lists
sudo apt update

# Install a package
sudo apt install -y postgresql

# Install multiple packages
sudo apt install -y redis-server memcached

# Install from other sources
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -

System configuration

You have full access to system files:

bash
# Edit system configuration
sudo nano /etc/hosts

# Manage services
sudo systemctl start postgresql
sudo systemctl enable postgresql
sudo systemctl status postgresql

# Configure firewall rules (internal to VM)
sudo ufw allow 8080

Docker

Docker can be installed and used normally:

bash
sudo apt install -y docker.io
sudo usermod -aG docker moltshell

# Start a new shell to pick up the group change, or:
newgrp docker

# Now you can use docker without sudo
docker run hello-world
docker compose up -d

File system operations

bash
# Create directories in system locations
sudo mkdir -p /opt/myapp
sudo chown moltshell:moltshell /opt/myapp

# Mount filesystems
sudo mount /dev/sdb1 /mnt/data

# Check disk usage
sudo du -sh /var/*

What to keep in mind

  • No password prompt: sudo never asks for a password. Commands execute immediately.
  • Persistence: System changes (installed packages, configuration files, created users) persist across VM suspends and resumes because the disk is persistent.
  • Caution with system services: Avoid modifying the nginx configuration or the moltshell-terminal systemd service. These are used by MoltShell to proxy your terminal connection. Breaking them will prevent you from connecting.
  • Memory limits: Installing and running heavy services (databases, Docker containers) consumes RAM from the 4GB available. Monitor usage with free -h and watch for memory warnings.
  • Disk space: The VM has 10-15GB of disk. Check available space with df -h before installing large packages.

MoltShell - Your Linux VM in the browser.