Skip to content

How To Blog

how to

  • How to Clear DNS Cache on Chrome, Firefox and Safari How-To
  • 15 Coolest Free Screensavers For Windows 10 Windows 10
  • OTT Explains : Is Facebook Listening To Me Through My Smartphone? Smartphones
  • pakistani passport fee for 10 years 2019 Calculator
  • 5 Ways To Force Quit Apps On Your Mac OS X
  • How to Install Chrome OS in VMWare Virtualization
  • Is Amazon Prime Worth The Cost? Cool Websites
  • How to Transfer Music from Android to iPhone without iTunes How-To

Change IP Address in Linux Using Terminal

Posted on October 9, 2020 By blog_786 No Comments on Change IP Address in Linux Using Terminal

Hello everyone and welcome to another fun article that takes us back to the basics of the Linux world. I know this article may sound too simple, but many people ask me, “How can I change my IP address on my Linux computer?” all the time. To do this, I created this simple guide that will come to your rescue.

Now that we’re done, let’s move on to changing the network configuration on the CentOS server.

Change IP Address in Linux Using Terminal

I am using a virtual machine, so my console will be open to the server, but you can use Putty or Terminal depending on your needs or environment.

After logging in, we go to the default prompt, so the first thing we do is change our working directory to the network-scripts directory.

# cd / etc / sysconfig / network-scripts

Now in this folder we will have a file named ifcfg- and the type of network connection you have. This can be eno for VMware machines, or eth for other types of virtual machines or physical machines. But it always starts with ifcfg- .

In my case, the network interface is ifcfg-eno16777984 .

So what I’m going to do next is edit this file with vi and change the values.

# vi ifcfg-eno16777984

Now we get the following output:

TYPE = “Ethernet”
BOOTPROTO = “none”
DEFROUTE = “yes”
IPV4_FAILURE_FATAL = “no”
IPV6INIT = “yes”
IPV6_AUTOCONF = “yes”
IPV6_DEFROUTE = “yes”
IPV6_FAILURE_FATAL = “no”
NAME = “nic1”
UUID = “e24c5ba8-46ad-41ed-af8e-1fb6f75d98bc”
DEVICE = “eno16777984”
ONBOOT = “yes”
IPADDR = “192.168.1.20”
NETMASK = “255.255.255.0”
GATEWAY = “192.168.1.254”
DNS1 = “192.168.1.1”
DNS2 = “”
DNS3 = “”
DOMAIN = ” home “
IPV6_PEERDNS =” yes “
IPV6_PEERROUTES =” yes “
IPV6_PRIVACY =” no “

This file is self-explanatory. We will need to change the IPADDR , NETMASK , GATEWAY and DNS values ??to the desired values, and then just reboot the network adapter

After changing the values, we will follow the steps below to make the system reload the network configuration.

# ifdown # ifup

After these two commands, the network interface is brought offline and online, and the configuration is reloaded.

It’s simple, right? Hope you enjoyed the article!

Linux Tags:Change IP Address in Linux Using Terminal

Post navigation

Previous Post: How to Split a Windows Image File (WIM to SVM)
Next Post: VMware Troubleshooting: Network Drop Issue

Related Posts

  • How to Install FreeRADIUS on Ubuntu Linux
  • How to Remove Metadata on Windows, Mac And Linux How-To
  • How to Run Linux on Windows with Virtual Box – Beginners Guide How-To
  • An Introduction To The Security Linux Distro “Tails” Linux
  • How to Install and Run Flatpak Applications 2021 Linux
  • Calculadora Paypal : Calcular Comisiones de Paypal Calculator

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018

2021 Android ) Apple apps Best browser change Chrome Closing words Concluding remarks Download email Error Facebook From Google Image Internet Keyboard Mac make Movies Music online Packaging phone? Photos Print Shortcuts sites Switch Time Tips Tricks turn using Video Videos Watch What With Word Working? your YouTube

  • 6 Best Free Messaging Apps for Android

    6 Best Free Messaging Apps for Android

  • How to Save Your Desktop Icon Layout in Windows XP, 7, 8 Computer Tips
  • how to access a windows network folder from my mac How-To
  • How To Split The Screen on a Mac Tutorials
  • Nintendo Switch SD Card: How To Choose And Use It
  • How to Copy Files and Folders in Google Drive How-To
  • What are your 7 best tips for creating a strong password? Computer Tips
  • How to Play Windows Games on Mac 2022 macOS

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Go to mobile version