Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Shell commands are fundamental for interacting with the Raspberry Pi's operating system, typically Raspbian (now known as Raspberry Pi OS). These commands allow users to manage files, configure system settings, and perform various administrative tasks directly from the command line interface (CLI). Understanding how to use shell commands is crucial for efficiently managing and automating tasks on your Raspberry Pi. This article will guide you through some essential shell commands and demonstrate their practical applications.
Examples:
Navigating the File System
Command: ls
ls
This command will display all files and directories in the current directory.
Command: cd
cd /home/pi/Documents
This command will change the current directory to /home/pi/Documents
.
Managing Files and Directories
Command: mkdir
mkdir new_folder
This command will create a directory named new_folder
in the current directory.
Command: rm
rm old_file.txt
This command will delete the file old_file.txt
.
To remove a directory and its contents, use:
rm -r old_folder
This command will recursively delete the directory old_folder
and all its contents.
System Information and Management
Command: top
top
This command will open an interactive display showing the current system processes.
Command: df
df -h
This command will display disk space usage in a human-readable format.
Network Configuration
Command: ifconfig
ifconfig
This command will display all active network interfaces and their configurations.
Command: ping
ping google.com
This command will send ICMP echo requests to google.com
and display the response.
Installing Software
apt-get
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3
These commands will update the package list, upgrade all installed packages, and install Python 3, respectively.