50 Raspberry Pi Linux Bash commands you’ll actually use

So, what is Bash?

The terminal (or ‘command-line’) on a computer allows a user a great deal of control over their system. All of these tools allow a user to directly manipulate their system through the use of commands. These commands can be chained together and/or combined together into complex scripts (see the linux usage page on scripting) that can potentially complete tasks more efficiently than much larger traditional software packages.

Bash is a Unix shell and command language written by Brian Fox for the GNU Project that powers the text interface of your Raspberry Pi. Every time you type a command into the terminal, you’re speaking Bash. First released in 1989, it has been distributed widely as the default login shell for Linux distributions and Apple Mac OSX. A version is also available for Windows 10. Before computers had graphical interfaces it was the only way you could interact with them. It’s necessarily very powerful and flexible. 

On the Raspberry Pi (running Raspbian), the default terminal application is LXTerminal.

A shell is a command processor which lets you manipulate your computer by typing in commands. Commands are typed after the “prompt” which is a brief snippet of text informing you who and where you are on the system:

Here is my list of useful Rasbian bash terminal commands:

General commands
apt-get update
apt-get upgrade
chmod +x filename
./myProgram.bin
clear
find / -name example.txt
nano example.txt
poweroff
raspi-config
reboot
shutdown -h now
shutdown -h 14:30
startx
File and directory
cat example.txt
cd /abc/xyz
cp XXX
ls -l
mkdir example_directory
mv XXX
rm example.txt
pwd
rmdir example_directory
scp user@10.0.0.32:/some/path/file.txt
touch example.txt
Network and web commands
hostname -I
ifconfig
iwconfig
iwlist wlan0 scan
iwlist wlan0 scan | grep ESSID
nmap
ping
wget http://www.somewebsite.com/example.txt
System info
cat /proc/meminfo
cat /proc/partitions
cat /proc/version
ctrl-c
df -h
df /
dpkg ––get–selections | grep XXX
dpkg ––get–selections
free
kill
lsusb
top
UP key
vcgencmd measure_temp
vcgencmd get_mem arm && vcgencmd get_mem gpu

Join the Discussion

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

arrow