This Raspberry Pi tutorial will take you through the basic and commonly used Raspberry Pi commands.
Each command can do a lot more of what I have shown here. To check out what more it can do, try “–help” after the command.
- PWD (Print Working Directory)
This tells you your current working directory.
- CD (Change Directory)
This commands is used to move to other directory. If you are on home and you want to move to pictures folders which is in Desktop folder, then you should do as shown below.
If you want to move back a directory, then write “cd ..” and to go to the home directory, just write “cd”
- LS (list)
This command lists the content of the current working directory.
This command when used with “-l” will list the files and folders in the current directory along with the file size, date modified and permissions.
Try “ls –help” and have a look at the other options.
- MKDIR (Make Directory)
This command is used to make a new directory.
- RMDIR (Remove Directory)
This command is used to remove an empty directory.
- RM (Remove)
If you want to remove a file (Both empty and not empty), then use this command. If used with –r will remove the file or even folder permanently.
If you want to create a new file, then use this command.
If you want to edit the file, then use this command.
- CP (Copy)
This command is used to copy a file or a folder from one location to the other.
If you want to copy the whole folder, then use it with “-r”.
- MV (Move)
This command will cut the file or folder from one location and will paste it to the other location.
To cut and paste a file, follow the below image.
If you want to cut and paste the folder. The folder must be empty.
This command is used to check that whether communication can be made with another host or not.
This command is used for network exploration and scanning. It can return port and OS information about a host or a range of hosts. Type “nmap” to check out what it can do.
This command tells you your hostname
This command will tell you the network configuration details such as your IP address.
This command is used to check which network you are using. It will tell the network name and its details.
- Iwlist wlan0 scan
This command will print the currently available wireless networks.
This command allows you to run a command as a superuser or another user. Simply type “sudo” to check what it can do.
This command is used to install, upgrade and remove the packages. Simply type “apt-get” to check what it can do.
This command is used to find the files or directories.
This command will open the configuration settings menu.
This command will open the Graphical User Interface.
This command will reboot the system immediately.
To shutdown now
To shutdown at specific time
If you any questions, feel free to ask us in the comment section.