A Quick Linux Tutorial

When you are logged into a Raspberry Pi running Ubuntu, You will be in a "Bash shell" program, which means you can run standard Unix commands and the Bash program will process them. Here are a few common commands:

ls  -  List the contents of a directory. With no arguments, it lists the contents of the current directory.

cd  - Change Directory to the given directory. With no arguments, it returns you to your home directory.

pwd  -  Display your Path Working Directory, or your current current directory.

cp  -  The copy command. Here's an example: cp this.file new.file

mv  -  The move/rename command. Use this command to move files to other directories, or to rename them. To rename 'this.file' to 'that.file': mv this.file that.file

rm  -  The delete or remove command. To delete 'this.file': rm this.file

mkdir  -  Make a new directory. 'mkdir sandbox' will create the directory 'sandbox' in the current directory.

cat  -  Print the contents of a file to the screen. 'cat /var/www/html/index.html' will print out the contents of the /var/www/html/index.html file.

less  -  View the contents of a file with control. 'less /var/www/html/index.html' will display the contents of this file. You can use the 'up' and 'down' arrow keys to scroll up and down the file. Press 'q' to quit the viewing.

exit  -  Exit the bash shell. This will log you out of the Raspberry Pi.

Copyright 2020
  • Facebook - Black Circle
  • Twitter - Black Circle
  • YouTube - Black Circle
  • Instagram - Black Circle
Follow us on these platforms