Understanding Ubuntu: Terminal Cheatsheet
22 November 2014
General Linux commands
cd – Change directory
cd .. – Go Back a directory
cd ../../ – Go back two directories
cp
mv
rm – Remove a file
mkdir
rmdir
man
ls – List files and folders
sudo – Executes command with root permissions
sudo su – Login to root user
nano – Easy to use command-line text editor
cat
clear – Clear the current terminal display
Ubuntu Specific Commands
sudo apt-get update – Ensures that the repositories have the latest packages available.
sudo apt-get upgrade – Upgrades installed packages
sudo apt-get install
sudo apt-get remove
sudo add-apt-repository
sudo apt-get autoremove – Removes any unused dependencies
sudo apt-get do-release-upgrade – Upgrades Ubuntu to a new version
Useful commands for server packages
edit php.ini – sudo nano /etc/php5/apache2/php.ini
edit virtual hosts – sudo nano /etc/apache2/sites_available/new_config
restart apache2 server – sudo service apache2 restart