Reference: https://pythonprogramming.net/terminal-navigation-raspberry-pi-tutorials/?completed=/remote-access-raspberry-pi-tutorials/
Code – Use
- pwd – print working directory defacult is /home/pi, also is ~
- cd – change directory: cd /home ; cd ~ ; cd / tab (help to fill possible command) ; cd .. (go back one level of directory); cd ../../ (go back two levels of directories)
- ls – list contents of directory
- mkdir – make directory: mkdir exemple (make example folder)
Test Python
- nano test.py
- print (‘hi’)
- ctrl+x; Y
- python test.py
Download from Internet
- wget https://www.pythonprogramming.net/static/images/categories/3D-Matplotlib.png
- sudo apt-get install git
- sudo apt-get autoremove
- git clone https://github.com/vinta/awesome-python
Remove file/directory
- rm 3D-Matplotlib.png (case sensitive)
- rmdir new
- rmdir awesome-python
- rm -r awesome-python (force removing)
ls
- ls -a ; ls -all (show all contents, including hidden contents)
- ls -l (contents in list format)
- ls -al (combine the above attributes)
- flag: – for short hand and — for full word
- ls –help
reboot and shut down raspberry pi
- sudo reboot
- sudo shutdown -h now
- sudo shutdown -r now