edit apt sources code

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

Code: Select all

sudo gedit /etc/apt/sources.list
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
addr
Level 2
Level 2
Posts: 50
Joined: Thu Apr 26, 2007 2:17 pm
Location: Brandon. Manitoba

Post by addr »

I can't get into my sources list.


sandy@sandy-desktop:~$ sudo gedit /etc/apt/sources.list
sudo: gedit: command not found
sandy@sandy-desktop:~$ sudo gedit/etc/apt/sources.list
sudo: gedit/etc/apt/sources.list: command not found
sandy@sandy-desktop:~$ sudo su
You will be awarded some great honor.
root@sandy-desktop:/home/sandy# gedit /etc/apt/sources.list
bash: gedit: command not found
root@sandy-desktop:/home/sandy#

What am I doing wrong?
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

gedit is only for the gnome version of mint.
if you are using the kde version use kate.

ie
sudo kate /etc/apt/sources.list

:D
Image
Now where was i going? Oh yes, crazy!
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

addr wrote:What am I doing wrong?
You're not reading the error messages :twisted: Always remember: Error messages on Linux are always very very precise :D

So if your Linux system says something like "gedit: command not found" then it simply means that there is no such command or program on your system.

Efforts like this one: "sudo gedit/etc/apt/sources.list" are pretty much pointless. First of all it's not what I wrote ... and I wouldn't write false commands on purpose or without having tried them out myself :wink: And secondly you still get an error message telling you that such a command too doesn't exist: "gedit/etc/apt/sources.list: command not found"

Therefore: Read your error messages! :twisted: They were given to you for a particular reason :wink:

So gedit doesn't exist on your system. So how could you find out what other editor is there on your system? ==> use the apropos command. You can ask apropos about a specific topic you're interested in and it will tell you what programs it knows that could be suitable for handling this topic.

So we're interested in editing files ... so why not ask apropos what it knows aobut this?

Code: Select all

apropos edit
On my system this will spit out a huge list and not all results are equally useful ... so please use some common sense here. Amongst the useful results I get stuff like:
  • gvim (1) - Vi IMproved, a programmers text editor
    joe (1) - Joe's Own Editor
    jpico (1) - Joe's Own Editor
    jstar (1) - Joe's Own Editor
    kate (1) - Advanced text editor for KDE
    nano (1) - Nano's ANOther editor, an enhanced free Pico clone
If you're not sure about the usefulness of a command you can ask the manual page about it. Let's say we're not really convinced that the program kate is what we want. Let's see its manual!

Code: Select all

man kate
When I type that command I get this back on my screen:
  • KATE(1) KDE User's Manual KATE(1)



    NAME
    kate - Advanced text editor for KDE

    SYNOPSIS
    kate [-s, --start name] [-u, --use] [-p, --pid pid] [-e, --encoding name] [-l, --line line] [-c, --column column] [-i, --stdin]
    [KDE Generic Options] [Qt Generic Options]


    DESCRIPTION
    Kate is the KDE Advanced Text Editor.


    Kate also provides the editor part for various applications, under the name KWrite.


    Some of Kate's many features include configurable syntax highlighting for languages ranging from C and C++ to HTML to bash scripts, the ability
    to create and maintain projects, a multiple document interface (MDI), and a self-contained terminal emulator.


    But Kate is more than a programmer's editor. Its ability to open several files at once makes it ideal for editing UNIX®'s many configuration
    files.
    .
So after reading this it's probably safe to say that yes, kate is what we wanted, given that we don't have gedit. :wink:

I hope you feel a tad more comfortable with your Linux installation now? :wink:
addr
Level 2
Level 2
Posts: 50
Joined: Thu Apr 26, 2007 2:17 pm
Location: Brandon. Manitoba

Post by addr »

Thankyou.
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

addr wrote:Thankyou.
You're welcome Image
Locked

Return to “Installation & Boot”