How do I reset my Network settings to default (Ubuntu 16)?

RJacob41

I messed up my network settings through the command line. I have a headless Ubuntu Server 16.04 without any desktop environment installed for a lighter-weight installation and connected to my local network through ethernet, and I use a Windows 10 laptop with SSH to access it, so I do not have a extra screen to use to reinstall Ubuntu. Is there any way to reset all my network settings through the command line?

What exactly happened was: I was playing around with the command line because I wanted to access my server through SSH without typing in an IP address every time I connected, so I used sudo hostname with all its possible arguments to change its hostname from an IP address to my name. Now, SSH, SFTP, FTP, SMB, HTTP and almost everything possible is a million times slower than usual and sometimes returns "Took too long to load".

I don't mind resetting the entire OS, but I don't have an screen/monitor to use with a bootable USB/DVD. I need a solution because my website is getting affected - It takes about 45 seconds to load a 8.2MB webpage although my internet speed is above 10MBPS.

SSH is working relatively better, so is there any command-line solution to my problem?

lewis4u

Run

ifconfig

and see the name of your network adapter. Mine is: enp0s3

now run this command

sudo nano /etc/network/interfaces

and you should get something inside....delete everything and paste this (but change the network adapter name where enp0s3 is):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp

save the document and reboot...

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How do I reset my Network settings to default (Ubuntu 16)?

분류에서Dev

How do I reset everything in regards to my network connection?

분류에서Dev

How do I make Geany my default editor on Ubuntu?

분류에서Dev

How to reset monitor settings to default through terminal?

분류에서Dev

How do I use puppet to configure network settings?

분류에서Dev

How to reset the sshd_config file to its default settings

분류에서Dev

How do I add a network printer in Ubuntu 12.04?

분류에서Dev

How can I configure the default settings of RStudio?

분류에서Dev

How can I reset Terminology settings if the terminal is inaccesable?

분류에서Dev

How do i configure samba on my Ubuntu Server 14.04

분류에서Dev

How do I check if my OpenPGP key is in the Ubuntu keyserver?

분류에서Dev

How do I update my Ubuntu? Archive manager fail

분류에서Dev

How do I get Ubuntu to detect my Intel Graphics?

분류에서Dev

How do I link my eth1 network card to my DNS?

분류에서Dev

How to reset default shortcuts for Ubuntu 15.10 (Macbook Pro Late 2013)

분류에서Dev

How do I configure APN settings on my QMI-based 4G modem?

분류에서Dev

How do I get my USB back to its original settings after using as a live usb?

분류에서Dev

How do I SCP from remote machine to local machine when I am outside of my home network?

분류에서Dev

How can I set a default profile for a network interface in network manager?

분류에서Dev

How do I reset Kik push token?

분류에서Dev

how do I reset netmon using powershell?

분류에서Dev

How do I enable laptop settings in debian?

분류에서Dev

How do I access an external drive mounted on a machine on my own network?

분류에서Dev

How do I make files copied over the network from my Windows computer be owned by me?

분류에서Dev

How do I get PPTP VPN working from my home network when it already works elsewhere?

분류에서Dev

I have a problem with Kdenlive reset settings

분류에서Dev

How can I reference my UserControls to display them on the Settings pane?

분류에서Dev

How can I upload my videos to the recommended encoding settings for YouTube?

분류에서Dev

How do I change the way Ubuntu adjusts my volume mixer levels?

Related 관련 기사

  1. 1

    How do I reset my Network settings to default (Ubuntu 16)?

  2. 2

    How do I reset everything in regards to my network connection?

  3. 3

    How do I make Geany my default editor on Ubuntu?

  4. 4

    How to reset monitor settings to default through terminal?

  5. 5

    How do I use puppet to configure network settings?

  6. 6

    How to reset the sshd_config file to its default settings

  7. 7

    How do I add a network printer in Ubuntu 12.04?

  8. 8

    How can I configure the default settings of RStudio?

  9. 9

    How can I reset Terminology settings if the terminal is inaccesable?

  10. 10

    How do i configure samba on my Ubuntu Server 14.04

  11. 11

    How do I check if my OpenPGP key is in the Ubuntu keyserver?

  12. 12

    How do I update my Ubuntu? Archive manager fail

  13. 13

    How do I get Ubuntu to detect my Intel Graphics?

  14. 14

    How do I link my eth1 network card to my DNS?

  15. 15

    How to reset default shortcuts for Ubuntu 15.10 (Macbook Pro Late 2013)

  16. 16

    How do I configure APN settings on my QMI-based 4G modem?

  17. 17

    How do I get my USB back to its original settings after using as a live usb?

  18. 18

    How do I SCP from remote machine to local machine when I am outside of my home network?

  19. 19

    How can I set a default profile for a network interface in network manager?

  20. 20

    How do I reset Kik push token?

  21. 21

    how do I reset netmon using powershell?

  22. 22

    How do I enable laptop settings in debian?

  23. 23

    How do I access an external drive mounted on a machine on my own network?

  24. 24

    How do I make files copied over the network from my Windows computer be owned by me?

  25. 25

    How do I get PPTP VPN working from my home network when it already works elsewhere?

  26. 26

    I have a problem with Kdenlive reset settings

  27. 27

    How can I reference my UserControls to display them on the Settings pane?

  28. 28

    How can I upload my videos to the recommended encoding settings for YouTube?

  29. 29

    How do I change the way Ubuntu adjusts my volume mixer levels?

뜨겁다태그

보관