Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Installing Atom
- First, use dpkg to install a text editor, called Atom. A .deb file is located at "/home/qwiklab/downloads/atom-amd64.deb", which you can install using this command:
- sudo dpkg -i /home/qwiklab/downloads/atom-amd64.deb
- You'll see some errors after this command, but that's okay! The atom package has some dependencies that aren't installed on your machine yet, and dpkg is just warning you that they need to be installed:
- You can remedy this by using apt to fix the missing dependencies, using this command:
- sudo apt install -f
- You'll be prompted to confirm your decision to continue with the operation by typing "Y" (for "Yes"), midway through the process.
- Now Atom is successfully installed, which you can verify using dpkg:
- dpkg -s atom
- Extracting an archive
- Next, you will extract a .tar archive. The archive "extract_me.tar" is located in "/home/qwiklab/downloads/". Move to that directory, using this command:
- cd /home/qwiklab/downloads
- You can use the Linux tar command to extract it using this command:
- sudo tar -xvf extract_me.tar
- The contents of the archive (the file named "great_job") are then extracted:
- Archiving files
- First, move back to the original directory:
- cd ~
- You can also use the tar command to do the reverse operation, creating an archive. There are three files in your /home/qwiklab/documents folder named "Earth", "Mercury", and "Venus". Use tar to archive them into the file "Planets.tar" using this command (one line):
- tar -cvf Planets.tar /home/qwiklab/documents/Earth /home/qwiklab/documents/Mercury /home/qwiklab/documents/Venus
- "Planets.tar" will then be added to your current directory, and will contain the three planet files:
- Installing 7-Zip
- You can also install programs on Linux, using apt too, which handles dependencies for you to simplify the installation process. You can install the program 7-Zip, using apt, with a simple one-line command:
- sudo apt install p7zip-full
- When it's finished, 7-Zip will be installed:
- You can verify the installation using dpkg, with this command:
- dpkg -s p7zip-full
- Uninstalling GIMP
- Uninstallation can also be handled by apt by using "remove" instead of "install" as the argument. GIMP, an image-editing program, is already installed on your machine. Uninstall it now, using apt with this command:
- sudo apt remove gimp
- You'll be prompted to confirm your decision midway through the uninstallation process. Confirm this by typing "Y" (for "Yes"). Then, GIMP will be uninstalled:
- You can verify this using dpkg (like before) with this command:
- dpkg -s gimp
- Conclusion
- Congrats! You've successfully installed and uninstalled programs on Linux, and archived and unarchived .tar files.
- Introduction
- ×
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement