Subscribe To Our List

We help electronics hobbyists to create projects related to Micro-controllers. Join our newsletter to get access to new projects first.
Email address
Secure and Spam free...

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.

 File System

  1. PWD (Print Working Directory)
    This tells you your current working directory.
    raspberry pi commands
  2. 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. raspberry pi commands
    If you want to move back a directory, then write “cd ..” and to go to the home directory, just write “cd”
  3. 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.
  4. MKDIR (Make Directory)
    This command is used to make a new directory.
  5. RMDIR (Remove Directory)
    This command is used to remove an empty directory.
  6. 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.
  7. Touch
    If you want to create a new file, then use this command.
  8. NANO
    If you want to edit the file, then use this command.
  9. 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”.
  10. 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.

Networking Commands

  1. Ping
    This command is used to check that whether communication can be made with another host or not.
  2. Nmap
    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.

  3. Hostname
    This command tells you your hostname
  4. Ifconfig
    This command will tell you the network configuration details such as your IP address.
  5. Iwconfig
    This command is used to check which network you are using. It will tell the network name and its details.
  6. Iwlist wlan0 scan
    This command will print the currently available wireless networks.

General Commands

  1. Sudo
    This command allows you to run a command as a superuser or another user. Simply type “sudo” to check what it can do.
  2. Apt-get
    This command is used to install, upgrade and remove the packages. Simply type “apt-get” to check what it can do.
  3. Find
    This command is used to find the files or directories.
  4. Raspi-config
    This command will open the configuration settings menu.
  5. Startx
    This command will open the Graphical User Interface.
  6. Reboot
    This command will reboot the system immediately.
  7. Shutdown
    To shutdown now

    To shutdown at specific time

If you any questions, feel free to ask us in the comment section.

 

JOIN OUR NEWSLETTER
We help electronics hobbyists to create projects related to Micro-controllers. Join our newsletter to get access to new projects first.
We hate spam. Your email address will not be sold or shared with anyone else.

Leave a Reply

Your email address will not be published.

Subscribe To Our List

We help electronics hobbyists to create projects related to Micro-controllers. Join our newsletter to get access to new projects first.
Email address
Secure and Spam free...
Skip to toolbar