Categories: Snippets

Edit a file using comand line

press Alt+F2 and type gnome-terminal if you’re using GUI

Then type

sudo nano /etc/apt/sources.list

(To understand better: in the directory /etc you can find (nearly) all configuration files of your computer and in the apt directory you find the souces.list file that contains all the repositories that APT uses to update or install and upgrade software)

Edit the file removing or commenting with # at the start of the line any duplicated rows.

Press Ctrl+X to exit and press y to save the file (or n to quit without saving).

Then update to see if you’ve fixed it:

Recent Posts

How To Troubleshoot Socket Errors in MySQL – Ubuntu

MySQL manages connections to the database server through the use of a socket file, a special…

5 years ago

How to remove .html, .php, etc (extension) from URL?

To remove the .html extension from your urls, you can use the following code in…

5 years ago

Ubuntu with Apache2: Installing and Configuring Your SSL Certificate

Use free/paid SSL certificates https://www.sslforfree.com Enable SSL Module Replace 'default-ssl' with the real site name…

5 years ago

Create zip archive excluding specific Files & Directories

Create archive of all files under public_html directory ignoring all files and folders including text…

6 years ago

how to use sudo command to install .tar.gz?

To install some file *.tar.gz, you basically would do: Open a console, and go to…

6 years ago

Change ownership of the directory in ubuntu

The chown command has the following syntax: [crayon-662f86632ea1a359555461/] So in your example command it is your primary…

6 years ago