Linux ubuntu terminal Cheatsheet

Well – we all now how easy commands get lost – this is my list of command I sometimes need to lean on.


crontab -eShow / modify user’s cronjobs


git add .Add all changes files to commit.
git checkout <branch>Checkout <branch>.
git clone <url>Clone Repository
git commitCommit Changes.
git pull origin masterPull from master branch.
git push origin masterPush to master branch.
git stashStash current changes.


php artisan key:generateGenerate Application Key.
php artisan make:factory <Factoryname> –model=<Modelname>Make new factory for Model.
php artisan make:model <modelname> -cmrMake model and include Controller, Migration & Ressource.
php artisan migrateMigrate tables.
php artisan migrate:rollbackUndo last migration.
php artisan serve –port=<port>Serve Application on <Port>.
php artisan tinkerstart new tinker session.


grep CRON /var/log/syslognpm run watchCheck Cronjob log


npm run watchwatch files and auto compile on change.


GRANT ALL PRIVILEGES ON *.* TO ‘<username>’@’localhost’ IDENTIFIED BY ‘<password>’;Give new user all permissions for all tables in used database.
REVOKE ALL PRIVILEGES, GRANT OPTION FROM ‘<username>’@’localhost’;Revoke all rights from user
use <dbname>Change database.
CREATE DATABASE ;Create database with


VBoxManage startvm "<vmName>" --type headlessStart headless virtual box from Terminal

Basic Ubuntu OS Setup

sudo apt-get update;
sudo add-apt-repository ppa:phoerious/keepassxc;
wget -qO - | sudo apt-key add -;
echo "deb apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list;
sudo apt-get update;
sudo apt-get install sublime-text git-core mysql-server mysql-client libmysqlclient-dev apache2 php php7.2-mbstring php7.2-xml php7.2-soap composer filezilla keepassxc;
git config --global "{{Username}}";
git config --global "{{Email}}";

Bash Alias

alias gc='git commit -m'
alias gps='git push origin'
alias gpl='git pull origin'
alias gl='git log'
alias gst='git status'
alias gsh='git stash'
alias npmrw='npm run watch'
alias gb='git branch'
alias gch='git checkout'


sudo update-alternatives –config phpSwitch PHP Shell Version

Dualboot System

sudo ntfsfix /dev/sdb1Fix Drive ntfs permission issues for ubuntu / win10 dualboots

Leave a Reply

Your email address will not be published. Required fields are marked *