Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Application to edit .conf files?

Hybrid View

  1. #1

    Default Application to edit .conf files?

    Hi guys,

    Been having some minor problems with my VPN after getting a new router and private internet access (the company I use) have suggested editing /etc/resolv.conf by using the command sudo nano /etc/resolv.conf but it says command not found for nano. I was in a real hurry this morning so couldn't check, but is this something I can easily install, or is there another piece of software LEAP uses instead? There was another thing they asked me to type in a while ago to get the software, but LEAP uses zypper so I had to change the command, so wondered if LEAP was similar.

    Many thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,398
    Blog Entries
    1

    Default Re: Application to edit .conf files?

    There are a number of CLI editors to choose from, but nano is simple to use. Install it with
    Code:
    sudo zypper in nano

  3. #3

    Default Re: Application to edit .conf files?

    That's great, thank you. When I open the file using nano (through the terminal/konsole) does it open a standalone text editor or something? I've been asked to edit the file to delete the DNS servers currently in the file and replace with their own ones to see if that sorts my issue.

    Cheers!!

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,398
    Blog Entries
    1

    Default Re: Application to edit .conf files?

    It's a CLI editor, so will open in the terminal. Use it like this
    Code:
    sudo nano /etc/resolv.conf

  5. #5

    Default Re: Application to edit .conf files?

    Thank you. But is it quite obvious as to how to delete sections from the file and then add more text in?

    If possible I want to get all prepared for when I try to do this tonight as I'd like to get it done if possible

    Thank you so much!

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,887
    Blog Entries
    15

    Default Re: Application to edit .conf files?

    On Fri 21 Apr 2017 11:46:01 AM CDT, thestig wrote:

    Thank you. But is it quite obvious as to how to delete sections from the
    file and then add more text in?

    If possible I want to get all prepared for when I try to do this tonight
    as I'd like to get it done if possible

    Thank you so much!


    Hi just add your nameservers and add a # to the current ones;
    Code:
    search some.domain
    #nameserver you.cur.ren.t01
    #nameserver you.cur.ren.t02
    nameserver xxx.xxx.xxx.xxx
    nameserver xxx.xxx.xxx.xxx
    If your using NetworkManager for VPN, then you should be able to just
    configure here?

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE Leap 42.2|GNOME 3.22.2|4.4.57-18.3-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  7. #7

    Default Re: Application to edit .conf files?

    Quote Originally Posted by malcolmlewis View Post
    Hi just add your nameservers and add a # to the current ones;
    Code:
    search some.domain
    #nameserver you.cur.ren.t01
    #nameserver you.cur.ren.t02
    nameserver xxx.xxx.xxx.xxx
    nameserver xxx.xxx.xxx.xxx
    If your using NetworkManager for VPN, then you should be able to just
    configure here?

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE Leap 42.2|GNOME 3.22.2|4.4.57-18.3-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

    Thanks,

    It's not configured with NetworkManager....for some reason it comes up with an error saying it couldn't start the process, so I use the terminal instead. I'll give this a go later tonight, hopefully all will be well! I'll let you know how it goes.

    Many thanks

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,308
    Blog Entries
    2

    Default Re: Application to edit .conf files?

    Quote Originally Posted by malcolmlewis View Post
    Hi just add your nameservers and add a # to the current ones;
    Code:
    search some.domain
    #nameserver you.cur.ren.t01
    #nameserver you.cur.ren.t02
    nameserver xxx.xxx.xxx.xxx
    nameserver xxx.xxx.xxx.xxx
    If your using NetworkManager for VPN, then you should be able to just
    configure here?

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE Leap 42.2|GNOME 3.22.2|4.4.57-18.3-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!
    Adding nameservers directly to /etc/resolv.conf only works for the current session and won't survive a reboot.
    Follow the instructions in the comments in /etc/resolv.conf to make persistent changes.

    But, as mentioned elsewhere,
    Assuming you're using Network Manager, it's better to configure your DNS servers there instead.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9

    Default Re: Application to edit .conf files?

    Open a terminal and do the following:

    1. Make a backup of resolv.conf in case it needs to be restored later.

    sudo cp /etc/resolv.conf /etc/resolv.bak

    2. Edit existing .conf

    sudo nano /etc/resolv.conf

    3. Please remove the listed DNS server(s) and add our DNS servers:

    nameserver 209.222.18.222

    nameserver 209.222.18.218

    Press control-x, and hit y and enter to save and exit nano. Once the changes are made, please try connecting again and check for data flow.

    If the configuration reverts when you boot, a starting process is changing the resolv.conf back to it's original format. This can be prevented by opening Terminal and typing:

    chattr +i /etc/resolv.conf​

    The file will need to be unlocked for further modification. To revert the immutable attribute, just replace run the same command with -i

    chattr -i /etc/resolv.conf​
    Does that sound like it should work OK? I will do this, but edit in kwrite.

    Cheers

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,171

    Default Re: Application to edit .conf files?

    Again, you should use the editor of YOUR choice. What you now show is all sorts of nano commands and manipulation.. I never used nano, thus I can not comment on it.

    Do you never use a text editor?

    Another thing is the problem behind your inability to us an editor.
    What s the problem you ty to resolve by editing //etc/resolv.conf. you seem to have an idea what and how to fix something there, but wweedo NOT know what this is and although there are some suggestions on what you could do, IMHO the real problem is undefined here.
    Henk van Velden

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •