Thursday, May 2, 2024
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 2000  / 2 Years ago, tue, october 18, 2022, 8:01:18

I have some questions about some Terminal commands:




  1. Why must you do sudo apt-get update before installing an program or after downloading something? Does it update Ubuntu then?


  2. What is the different between sudo gedit /location/to/afile.txt and gksu gedit /location/to/afile.txt?


  3. Why people don't use -y on the end of a command, like for example in sudo apt-get install programx -y.


  4. What does the -i and -l (are there any more) mean in a Terminal?


  5. How can I unpack any .zip or .tar.gz file in a Terminal?



More From » command-line

 Answers
4

sudo apt-get update updates the repository information of apt, so you can install the latest version of packages.



sudo gedit will ask you for a password in the terminal window, while gksu gedit prompts for a password with a GUI.



Most people like to review any changes they make with root permissions, that's why they refrain from using sudo apt-get -y and similar.



As for -i and -l, these look like parameters you would give to a command. Each command behaves differently and uses different switches, so without knowing the specific command, it's not possible to tell what these mean. Read the manual (man apt-get, for example) or try using --help with any command.



Use unzip file.zip to extract a zip file and tar xzf file.tar.gz to extract a tar.gz file.


[#24856] Thursday, October 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
smelrop

Total Points: 263
Total Questions: 122
Total Answers: 108

Location: Saudi Arabia
Member since Thu, Jan 28, 2021
3 Years ago
;