Files, code and terminal

Terminal: useful commands for every stack

Copy-paste commands for files, Node.js, Python, PHP, Java, databases and git.

  1. Files and folders
  2. Node.js
  3. Python
  4. PHP and Laravel
  5. Java
  6. Databases
  7. git
  8. What the terminal cannot do

Files and folders

ls -la                       # list, with hidden files
cd ~/web/yourdomain.com/app  # go to your app
pwd                          # where am I
du -sh * | sort -h           # what uses space
unzip site.zip -d .          # extract
tar -xzf backup.tar.gz       # extract a .tar.gz
nano .env                    # edit a file (Ctrl+O save, Ctrl+X exit)
find . -name "*.log" -size +50M   # big log files

Node.js

node -v && npm -v
export PATH=/opt/cloudninza/node/22/bin:$PATH   # use Node 22 in this session
npm ci                       # install exactly from package-lock
npm run build
mkdir -p tmp && touch tmp/restart.txt        # restart the app

Python

source .venv/bin/activate    # the app's virtualenv
pip install -r requirements.txt
python manage.py migrate     # Django
deactivate

PHP and Laravel

php -v
composer install --no-dev
php artisan migrate --force
php artisan optimize:clear
~/.wp-cli/wp plugin update --all   # WordPress

Java

java -version
mvn -q -DskipTests package
./gradlew bootJar

Databases

mysql -u USER_dbuser -p USER_dbname                 # MariaDB/MySQL shell
mysql -u USER_dbuser -p USER_dbname < dump.sql      # import
mysqldump -u USER_dbuser -p USER_dbname > dump.sql  # export
/usr/lib/postgresql/18/bin/psql -h localhost -U USER_dbuser USER_dbname   # PostgreSQL

git

git status
git pull
git log --oneline -5

What the terminal cannot do

It runs in a private sandbox: no sudo, no system services, nothing outside your account. Start, stop and restart apps from App settings (or touch tmp/restart.txt). App output is under App settings → Logs.

Stuck? Our engineers answer support tickets around the clock. Contact us, or create an account and open a ticket from the dashboard — the same guides are there too.

Next step

Move your site, or your whole cloud estate

Shared hosting you can buy in two minutes. Infrastructure and managed services quoted by an engineer within one business day.