Page 39 - Raspberry Pi as a Foundation for Boosting Computer and Technology Literacy
P. 39

Overview of shell commands  3.3

            Table 3.1  Frequently used commands for package management
            Command                 Description
            sudo apt update         Synchronize the local package versions with
                                    the repository
            sudo apt upgrade        Install the new versions of packages
            apt list --upgradable List all the packages that can be upgraded
            apt list --installed    List all the packages installed on the system
            apt search pack-        Search the software repository for a specific package
            age-name
            sudo apt install        Install a specific package
            package-name
            sudo apt remove pack- Remove a specific package
            age-name
            Directory and file management
            The structure of a Linux file system originates from the root directory
            “/”, which subsequently includes all other directories (Figure 3.12). Al-
            tering files and folders within the root directory could lead to security
            vulnerabilities or even completely break the system. Thus, it requires
            superuser privileges and is generally not advisable.
              Nevertheless, a “/home” directory (Figure 3.12 and Figure 3.13) ex-
            ists that includes home folders (or personal directories) of regular us-
            ers (located at “/home/user-name” or “~/”). In contrast, any actions
            performed inside a user’s home folder are safe and do not require
            sudo, as they do not affect the entire system. The terminal emulator

















                                            Figure 3,13  Tree of home directory





            Figure 3.12  Tree of a root directory


                                                            39
   34   35   36   37   38   39   40   41   42   43   44