How to set a static IP address on Debian server
Share with Your Friends
Your email has been sent
Jack Wallen walks you through the process of giving a standard user sudo privileges so they can set a static IP address on Debian server.
Debian is one of the most reliable operating systems on the planet. Its slower release cycle means each iteration gets plenty of attention before each release. And Debian isn’t just for desktops. In fact, Debian has been deployed as a server for years.
The one thing many new admins might find with deploying Debian as a server is that setting an IP address isn’t exactly as intuitive as other distributions. RHEL-based Linux distributions have the nmtui ncurses tools for configuring network connections, and Ubuntu-based distributions have netplan. With Debian, setting a static IP address is a bit more old-school, so I’m going to show you how it’s done.
SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)
What you need to setup an IP address in a Debian server
To set the IP address on Debian server, you’ll need a running instance of the OS and either a user with sudo privileges or access to the root user account. I’ll show you first how to give a standard user sudo privileges.
How to give a standard user sudo privileges in a Debian server
Let’s create a new user first. I’ll demonstrate by creating the user olivia (you can name the user whatever you like). To do that, log into Debian server as the root user and issue the command:
Once you’ve added the new user, add that user to the sudo group with:
sudo usermod -aG sudo olivia
Exit from the root user and log in with the new user account.
How to set a static IP address in a Debian server
The first thing you must do is locate the name of your network device. For that, issue the command:
ip -c link show
You should at least see two devices, lo (for loopback) and another named device (such as enp0s3).
Next, let’s back up the current network configuration file with the command:
sudo cp /etc/network/interfaces ~/
Open the configuration file for editing with the command:
sudo nano /etc/network/interfaces
If you find nano isn’t installed, add it with the command:
sudo apt-get install nano -y
With the interfaces file open for editing, you should see a DHCP configuration that looks like this:
# The primary network interface
iface enp0s3 inet dhcp
Comment that block out so it looks like this:
# allow-hotplug enp0s3
# iface enp0s3 inet dhcp
Now, we can add the necessary configuration for a static IP address. Let’s configure enp0s3 to use the address 192.168.1.97, with a gateway of 192.168.1.1, and a DNS nameserver of 220.127.116.11. That configuration will look like this:
iface enp0s3 inet static
Make sure to edit the above configuration to match your network scheme. Save and close the file.
Finally, restart the networking service with the command:
sudo systemctl restart networking
Make sure the networking configuration is correct, by issuing the command:
You should see the static IP address you configured. You’re good to go.
And that’s all there is to configure a static IP address in Debian server. Of course, if you installed your instance of Debian server with a desktop environment, you could simply use the GUI tool for this process. But for those who prefer to keep their servers sans GUI, this is the way to go.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.
Subscribe to the Developer Insider Newsletter
From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays
- How to become a developer: A cheat sheet (TechRepublic)
- How-to guide for Linux administrators (free PDF) (TechRepublic)
- Linux 101: What tech pros need to know (TechRepublic Premium)
- Linux, Android, and more open source tech coverage (TechRepublic on Flipboard)
- See all of Jack's content
- Open source
TechRepublic Premium Editorial Calendar: Policies, Checklists, Hiring Kits and Glossaries for Download
TechRepublic Premium content helps you solve your toughest IT issues and jump-start your career or next project.
7 Best AI Art Generators of 2023
This is a comprehensive list of the best AI art generators. Explore the advanced technology that transforms imagination into stunning artworks.
The Best Cheap Payroll Services for 2023
Find the perfect payroll service for your business without breaking the bank. Discover the top cheap payroll services, features, pricing and pros and cons.
NordVPN Review (2023): Pricing, Security & Performance
Is NordVPN worth it? How much does it cost and is it safe to use? Read our NordVPN review to learn about pricing, features, security, and more.
Best Free Project Management Software for 2023
Free project management software provides flexibility for managing projects without paying a cent. Check out our list of the top free project management tools.
Cloud Strategies Are Facing a New Era of Strain in Australia, New Zealand
Australian and New Zealand enterprises in the public cloud are facing pressure to optimize cloud strategies due to a growth in usage and expected future demand, including for artificial intelligence use cases.
Quick Glossary: Startups
According to Microsoft, there are 150 million startups in the world, with 50 million new startups launching every year. On average, there are 137,000 startups emerging every day. With competition that high, it is hard for new startups to succeed — and it’s important to know the words behind the stories. This glossary from TechRepublic ...
Business Conduct and Ethics Policy
Employees, investors and customers trust an organization that is committed to integrity and ethical business practices. The purpose of this policy from TechRepublic Premium is to provide guidelines for conducting business operations with the utmost integrity, ethical conduct and adherence to all applicable laws and regulations. From the policy: COMPANY ASSETS AND RECORDS The company ...
Quick Glossary: Video Streaming
Not too long ago, creating a video for general consumption required an expensive camera, expensive software and trained personnel. Advancements in technology and technique provide new, less-expensive options for creating, recording and broadcasting video. With the use of an open-source video encoder, some basic know-how, simple cloud-based software and a computer, anyone can create, stream ...
- TechRepublic on Twitter
- TechRepublic on Facebook
- TechRepublic on LinkedIn
- TechRepublic on Flipboard
- Property of TechnologyAdvice
Create a TechRepublic Account
Get the web's best business technology news, tutorials, reviews, trends, and analysis—in your inbox. Let's start with the basics.
* - indicates required fields
Sign in to TechRepublic
Lost your password? Request a new password
Please enter your email adress. You will receive an email message with instructions on how to reset your password.
Check your email for a password reset link. If you didn't receive an email don't forgot to check your spam folder, otherwise contact support .
Welcome. Tell us a little bit about you.
This will help us provide you with customized content.
Want to receive more TechRepublic news?
You're all set.
Thanks for signing up! Keep an eye out for a confirmation email from our team. To ensure any newsletters you subscribed to hit your inbox, make sure to add [email protected] to your contacts list.
How to Configure Static IP Address on Debian 12
To configure a static IP address on Debian 12, you can follow these steps:
Step 1 : Open a terminal window.
Step 2 : Open the network configuration file for editing using a text editor like nano or vi. In this example, we'll use nano:
Step 3 : Locate the network interface you want to configure with a static IP address. It is usually named "eth0" for Ethernet connections or "wlan0" for wireless connections. You might have a different interface name depending on your setup.
Step 4 : Replace the existing configuration with the following lines:
Replace <interface_name> with the actual name of your network interface, <desired_ip_address> with the IP address you want to assign to your Debian machine, <netmask_address> with the subnet mask, and <default_gateway_address> with the IP address of your router or gateway.
For example, the configuration for a static IP address of "192.168.1.100" with a subnet mask of "255.255.255.0" and a default gateway of "192.168.1.1" on the "eth0" interface would look like this:
Step 5 : Save the changes by pressing Ctrl+O, then exit the text editor by pressing Ctrl+X.
Step 6 : Restart the networking service to apply the new configuration:
Note: If you are using NetworkManager instead of the traditional networking service, you can restart it using the following command:
Step 7 : Verify the changes by running the following command:
Replace <interface_name> with the actual name of your network interface. You should see the configured static IP address in the output.
That's it! You have successfully configured a static IP address on Debian 12.
How to Install and Use Podman on Ubuntu 22.04
19 days ago
How To Install Docker on Ubuntu 22.04
How To Use Apache as a Reverse Proxy with mod_proxy on Ubuntu 22.04
3 months ago
How To Set Up Password Authentication with Apache on Ubuntu 22.04
How to Install Let's Encrypt SSL with Apache on Ubuntu 22.04
How to Configure SSL for Apache on Ubuntu 22.04
How to set up Apache virtual host on Ubuntu 22.04
How to Install PHP 8.3 on Ubuntu 22.04
How to Install PHP 8.2 on Ubuntu 22.04
How to Install PHP 8.0 on Ubuntu 22.04
How to Install PHP 7.4 on Ubuntu 22.04
How to Install PHP 7.2 on Ubuntu 22.04
How to Install vsftpd FTP Server on Ubuntu 22.04
4 months ago
How to Setup SFTP Server on Ubuntu 22.04
How to Install and Use rsync on ubuntu 22.04
How to Assign Static IP Address on Debian 12
In this blog post, we will show you how to assign static ip address on Debian 12.
In the world of Linux, Debian remains one of the most popular distributions, known for its stability and versatility. One essential aspect of managing a Linux system is configuring network settings. Whether you’re setting up a server or just want a consistent IP address for your desktop, assigning a static IP address on Debian 12 can be a crucial task.
Table of Contents
- Pre-Installed Debian 12
- Sudo User with admin rights
There are different methods through we can assign static ip address on Debian 12.
Method1: Assign Static IP Address on Debian 12 Using GUI
Login to your Debian Desktop environment, From Activity –> Search Settings –> Choose Network
Click on Wired Settings and then we will get the following window,
Note: To disable IPv6, go to IPv6 tab and choose ‘ Disable ’ option
Click on IPv4 Tab
Above window shows that Automatic DHCP is enabled, so to Assign Static IP choose ‘ Manual’ and then specify the IP details like IP address, netmask, gateway and dns server IP.
Important Note: To Specify the dns server IP first disable the automatic dns IP by toggling it.
Click on Apply to save the changes.
Now, disable and enable the interface by toggling it so that new IP address is mapped to the Interface.
Now again click on wired settings to verify whether the new static ip address is assigned or not.
Perfect, above confirms that new static IP address is assigned successfully.
Method2: Assign Static IP Address on Debian 12 From Command Line
Open the terminal, check your current network configuration. You can do this by running the following ip command ,
This will display a list of network interfaces on your system. Note down the name of the interface you want to assign a static IP address to (typically, it’s ‘ enp0s3 ‘ for Ethernet).
Next, run nmcli command to get connection name,
Once we get the connection name, run below nmcli command to assign static ipv4 address,
$ nmcli con mod ‘connection-name’ ipv4.address <IP-Address>
Set the gateway by running below
Change Configuration from DHCP to Manual , so that IP will be static and persistent, run
Set the DNS server IP by running below command,
Disable and enable the connection so that above changes come into the effect.
Now run IP Command to check IP address,
Output of above commands would look like below:
Perfect, above output confirms that static IP address has been assigned successfully on enp0s3 interface.
Assign Static IP Address on Minimal Installed Debian 12
Whenever we install minimal Debian 12 then we will have only the CLI console and don’t have any nmcli utility. So, to assin static ip address we must edit the file ‘ /etc/network/interfaces ’.
Edit the file and set the static IP address as shown below,
Replace the line ‘ allow-htplug enp0s3 ’ with ‘ auto enp0s3 ‘ and change dhcp parameter to static . Below is my sample file, change interface name and ip details as per your environment.
save & close the file.
To make above changes into the effect the restart the network service
Now, run ip command to verify the ip address,
That’s all from this post. Please do share your feedback and queries in below comments section.
Assigning a static IP address on Debian 12 is a straightforward process that can greatly benefit your network stability and ease of access. By following the steps outlined in this guide, you can ensure that your Debian 12 system always has a consistent IP address, making it easier to manage and access your resources. Whether you’re configuring a server or just prefer having a stable address for your desktop, Debian 12 provides a user-friendly environment for all your networking needs.
Also Read : How to Install Kubernetes Cluster on Debian 12 | 11
2 thoughts on “How to Assign Static IP Address on Debian 12”
Nice Guide. Appreciate it.
In case someone has used “sudo raspi-config” > Advanced Options > Network Interface Names > Would you like to enable predictable network interface names ?
pi@pi-san-rasp:~ $ sudo nmcli connection modify Wired\ connection\ 1 ipv4.addresses 192.168.1.10/24 pi@pi-san-rasp:~ $ sudo nmcli connection modify Wired\ connection\ 1 ipv4.gateway 192.168.1.1 pi@pi-san-rasp:~ $ sudo nmcli connection modify Wired\ connection\ 1 ipv4.method manual pi@pi-san-rasp:~ $ sudo nmcli connection modify Wired\ connection\ 1 ipv4.dns ‘18.104.22.168’ pi@pi-san-rasp:~ $ sudo reboot
Leave a Comment Cancel reply
3 ways to configure the network
Starting and stopping interfaces, reinitialize new network setup, network interface names, using dhcp to automatically configure the interface, configuring the interface manually, setting the speed and duplex, bringing up an interface without an ip address, the resolv.conf configuration file, the resolvconf program, dns configuration for networkmanager, using systemd-resolved for dns resolution, dhcp client configuration, bridging without switching, manual config, network init script config, bridges and vlans, caveats when using bridging and vlan, network config, bonding with active backup, /etc/network/interfaces, how to set the mtu (max transfer unit / packet size) with vlans over a bonded interface, legacy method, iproute2 method.
- The interfaces configuration file at /etc/network/interfaces (this page): for basic or simple configurations (e.g. workstation)
Setting up an Ethernet Interface
Upgrading and network interface names.
- Identify the interface in question (it will often be eth0). Adjust the remainder of these instructions accordingly.
- Reboot the machine to make sure it comes up correctly, and be prepared to intervene manually (e.g. Ctrl-Alt-Del and then boot into single-user mode from GRUB or LILO) if things don't work.
Defining the (DNS) Nameservers
- DHCP clients
- Choose a connection (from the Wired or Wireless tab) and click Edit.
- Click on the IPv4 Settings tab
- Choose 'Automatic (DHCP) addresses only' instead of just 'Automatic (DHCP)'.
- Enter the DNS servers in the “DNS servers” field, separated by spaces (e.g. 22.214.171.124 for OpenDNS).
- Click “Apply.”
Checking the status and flushing the cache in systemd-resolved, managing systemd-resolved settings, setting additional dns servers, setting additional search domains, howto use vlan (dot1q, 802.1q, trunk) (etch, lenny), howto create fault tolerant bonding with vlan (etch - stretch).
Multiple IP addresses on one Interface
NetworkConfiguration ( last modified 2023-07-18 11:37:31 )
- Powered by MoinMoin and Python , with hosting provided by Metropolitan Area Network Darmstadt .
- The Debian Administrator's Handbook
8.2. Configuring the Network
BACK TO BASICS Essential network concepts (Ethernet, IP address, subnet, broadcast)
8.2.1. Ethernet Interface
Example 8.1. DHCP configuration
IN PRACTICE Names of network interfaces
Example 8.2. Static configuration
NOTE Multiple addresses
8.2.2. Wireless Interface
126.96.36.199. installing the required firmwares, 188.8.131.52. wireless specific entries in /etc/network/interfaces.
Example 8.3. DHCP configuration for a wireless interface
HISTORY WEP encryption
8.2.3. Connecting with PPP through a PSTN Modem
8.2.4. connecting through an adsl modem, 184.108.40.206. modems supporting pppoe.
TIP Starting ppp at boot
220.127.116.11. Modems Supporting PPTP
18.104.22.168. modems supporting dhcp.
BACK TO BASICS Crossover cable for a direct Ethernet connection
8.2.5. Automatic Network Configuration for Roaming Users
- Prev Chapter 8. Basic Configuration: Network, Accounts...
- Next 8.3. Setting the Hostname and Configuring the Nam...
How to Set Up a Static IP Address on Debian 12 Linux
A static IP address is already understandable from its name that this IP address will not change. The static IP address is the fixed address that is assigned to a particular network port.
If one wants to connect to the machine using a remote connection, a static IP address is required for it. If one is connected using the dynamic IP address, then the connection will be interrupted again and again.
Due to this, it is necessary to set up a static IP address on Debian 12, especially when one wants to connect the computer remotely. In this post, the methods for setting up a static IP address on Debian 12 have been explained.
What are the Methods to Set Up a Static IP Address on Debian 12?
One can set up the static IP address on Debian 12 by using any of the below-mentioned methods:
- Using the /etc/network/interfaces
- Using the Network Manager
- Using the GUI Method
Method 1: Set Up a Static IP Address on Debian 12 Using the /etc/network/interfaces
The first method of setting up the static IP address on Debian 12 is by editing the /etc/network/interfaces file with the text editor. To use the /etc/network/interfaces, follow the next-mentioned steps.
Step 1: Open the Terminal
First, open the terminal to run the commands for setting up the static IP address:
Step 2: Create a Backup
Create a backup of the original /etc/network/interfaces by copying its contents:
Step 3: Open the /etc/network/interfaces File
Using the nano or any other text editor, open the /etc/network/interfaces file:
Step 4: Set Up the Static IP Address
Now find the name of the network interface of which the static IP address is supposed to be set up and assign the IP address:
After making changes, save the file and close it by using the shortcuts CTRL+S and CTRL+X , respectively.
Step 5: Restart the Network
The final step of this method is to restart the network:
Method 2: Set Up a Static IP Address on Debian 12 Using the Network Manager
Another method to set up the static IP address on Debian 12 is by using the network manager. For this, follow the steps mentioned below.
Step 1: Use the nmcli Command
With the help of the nmcli command utility, set up the static IP address. To do so, follow the below-mentioned general syntax:
In the above command, change the “Your Connection Name” with your own values. For example, in our case, the above command will be used like this:
If the name of the “ connection name ” is not known to you, then use the command:
Step 2: Reload the NetworkManager
To save the changes, reload the network manager with the command:
Method 3: Set Up a Static IP Address on Debian 12 Using the GUI
The last but easiest method of setting up the static IP Address on Debian 12 is by using the GUI. The graphical user interface method is to understand, simply open the “ Settings ” of the Debian 12:
Click on “ Network ” and then choose the “ gear icon ” for the network connection:
Now click on “ IPv4 ”, then change the address to your own choice, and finally click on the “ Apply ” button:
The static IP address will be set up successfully.
How to Verify the Changes to Static IP Address on Debian 12?
To verify the changes to the static IP address on Debian 12, use the command:
These are the three methods of setting up the static IP address on Debian 12.
On Debian 12, one can use the “ Network Manager ” or change the “ /etc/network/interfaces ” file to configure the static IP address. Also, access Settings to set the IPv4 address. This post has explained all the mentioned methods with a step-by-step guide.
How to use the ip command on linux.
It is time to break up with ifconfig.
How the ip command works, using ip with addresses, display only ipv4 or ipv6 addresses, display information for a single interface, adding an ip address, deleting an ip address, using ip with network interfaces, starting and stopping links, using ip with routes, display information for a single route, adding a route, taken route, not taken root, key takeaways.
- The ip command has replaced the older ifconfig command in modern versions of Linux.
- The ip command allows you to configure IP addresses, network interfaces, and routing rules on the fly without rebooting.
- Run "ip addr" in the Terminal to get your PC's local IP address.
You can configure IP addresses, network interfaces, and routing rules on the fly with the Linux ip command. We'll show you how you can use this modern replacement of the classic (and now deprecated) ifconfig .
With the ip command, you can adjust the way a Linux computer handles IP addresses, network interfaces controllers (NICs), and routing rules . The changes also take immediate effect — you don't have to reboot. The ip command can do a lot more than this, but we'll focus on the most common uses in this article.
The ip command has many subcommands, each of which works on a type of object, such as IP addresses and routes. There are, in turn, many options for each of these objects. It's this richness of functionality that gives the ip command the granularity you need to perform what can be delicate tasks. This isn't ax work — it calls for a set of scalpels.
We'll look at the following objects:
- Address : IP addresses and ranges.
- Link : Network interfaces, such as wired connections and Wi-Fi adapters.
- Route : The rules that manage the routing of traffic sent to addresses via interfaces ( links ).
Obviously, you first have to know the settings you're dealing with. To discover which IP addresses your computer has, you use the ip command with the object address . The default action is show , which lists the IP addresses. You can also omit show and abbreviate address as "addr" or even "a."
The following commands are all equivalent:
ip address show
ip addr show
We see two IP addresses, along with a lot of other information. IP addresses are associated with network interface controllers (NICs). The ip command tries to be helpful and provides a bunch of information about the interface, too.
The first IP address is the (internal) loopback address used to communicate within the computer. The second is the actual (external) IP address the computer has on the local area network (LAN).
Let's break down all the information we received:
- lo : The network interface name as a string.
- <LOOPBACK,UP,LOWER_UP>: This is a loopback interface. It's UP , meaning it's operational. The physical networking layer (layer one) is also up.
- mtu 65536: The maximum transfer unit. This is the size of the largest chunk of data this interface can transmit.
- qdisc noqueue: A qdisc is a queuing mechanism. It schedules the transmission of packets. There are different queuing techniques called disciplines. The noqueue discipline means "send instantly, don't queue." This is the default qdisc discipline for virtual devices, such as the loopback address.
- state UNKNOWN: This can be DOWN (the network interface is not operational), UNKNOWN (the network interface is operational but nothing is connected), or UP (the network is operational and there is a connection).
- group default: Interfaces can be grouped logically. The default is to place them all in a group called "default."
- qlen 1000: The maximum length of the transmission queue.
- link/loopback: The media access control (MAC) address of the interface.
- inet 127.0.0.1/8: The IP version 4 address. The part of the address after the forward-slash ( / ) is Classless Inter-Domain Routing notation (CIDR) representing the subnet mask. It indicates how many leading contiguous bits are set to one in the subnet mask. The value of eight means eight bits. Eight bits set to one represents 255 in binary, so the subnet mask is 255.0.0.0.
- scope host: The IP address scope. This IP address is only valid inside the computer (the "host").
- lo: The interface with which this IP address is associated.
- valid_lft: Valid lifetime. For an IP version 4 IP address allocated by Dynamic Host Configuration Protocol (DHCP), this is the length of time the IP address is considered valid and able to make and accept connection requests.
- preferred_lft: Preferred lifetime. For an IP version 4 IP address allocated by DHCP, this is the amount of time the IP address can be used with no restrictions. This should never be larger than the valid_lft value.
- inet6 : The IP version 6 address, scope , valid_lft , and preferred_lft .
The physical interface is more interesting, as we'll show below:
- enp0s3: The network interface name as a string. The "en" stands for ethernet, "p0" is the bus number of the ethernet card, and "s3" is the slot number.
- <BROADCAST,MULTICAST,UP,LOWER_UP>: This interface supports broad- and multicasting , and the interface is UP (operational and connected). The hardware layer of the network (layer one) is also UP .
- mtu 1500: The maximum transfer unit this interface supports.
- qdisc fq_codel: The scheduler is using a discipline called "Fair Queuing, Controlled Delay." It's designed to provide a fair share of the bandwidth to all the traffic flows that use the queue.
- state UP: The interface is operational and connected.
- group default: This interface is in the "default" interface group.
- link/ether: The MAC address of the interface.
- inet 192.168.4.26/24: The IP version 4 address. The "/24" tells us there are 24 contiguous leading bits set to one in the subnet mask. That's three groups of eight bits. An eight-bit binary number equates to 255; therefore, the subnet mask is 255.255.255.0.
- brd 192.168.4.255: The broadcast address for this subnet.
- scope global: The IP address is valid everywhere on this network.
- dynamic: The IP address is lost when the interface goes down.
- noprefixroute: Do not create a route in the route table when this IP address is added. Someone has to add a route manually if he wants to use one with this IP address. Likewise, if this IP address is deleted, don't look for a route to delete.
- enp0s3: The interface with which this IP address is associated.
- valid_lft: Valid lifetime. The time the IP address will be considered valid; 86,240 seconds is 23 hours and 57 minutes.
- preferred_lft: Preferred lifetime. The time the IP address will operate without any restrictions.
- inet6: The IP version 6 address, scope , valid_lft , and preferred_lft .
If you want to limit the output to the IP version 4 addresses, you can use the -4 option, as follows:
If you want to limit the output to the IP version 6 addresses, you can use the -6 option, as follows:
If you want to see the IP address information for a single interface, you can use the show and dev options, and name the interface, as shown below:
ip addr show dev lo
ip addr show dev enp0s3
You can also use the -4 or -6 flag to further refine the output so you only see that in which you're interested.
If you want to see the IP version 4 information related to the addresses on interface enp0s3 , type the following command:
ip -4 addr show dev enp0s3
You can use the add and dev options to add an IP address to an interface. You just have to tell the ip command which IP address to add, and to which interface to add it.
We're going to add the IP address 192.168.4.44 to the enp0s3 interface. We also have to provide the CIDR notation for the subnet mask.
We type the following:
sudo ip addr add 192.168.4.44/24 dev enp0s3
We type the following to take another look at the IP version 4 IP addresses on this interface:
The new IP address is present on this network interface. We jump on another computer and use the following command to see if we can ping the new IP address :
The IP address responds and sends back acknowledgments to the pings. Our new IP address is up and running after one simple ip command.
To delete an IP address, the command is almost the same as the one to add one, except you replace add with del , as shown below:
sudo ip addr del 192.168.4.44/24 dev enp0s3
If we type the following to check, we see the new IP address has been deleted:
You use the link object to inspect and work with network interfaces. Type the following command to see the interfaces installed on your computer:
ip link show
To see a single network interface, just add its name to the command, as shown below:
ip link show enp0s3
You can use the set option with either up or down to stop or start a network interface option. You also have to use sudo , as shown below:
sudo ip link set enp0s3 down
We type the following to take a look at the network interface:
The state of the network interface is DOWN . We can use the up option to restart a network interface, as shown below:
sudo ip link set enp0s3 up
We type the following to do another quick check on the state of the network interface:
The network interface was restarted, and the state is shown as UP .
With the route object, you can inspect and manipulate routes. Routes define to where network traffic to different IP addresses is forwarded, and through which network interface.
If the destination computer or device shares a network with the sending computer, the sending computer can forward the packet directly to it.
However, if the destination device is not directly connected, the sending computer forwards the packet to the default router. The router then decides where to send the packet.
To see the routes defined on your computer, type the following command:
Let's take a look at the info we received:
- default: The default rule. This route is used if none of the other rules match what's being sent.
- via 192.168.4.1: Routes the packets via the device at 192.168.4.1. This is the IP address of the default router on this network.
- dev enp0s3: Use this network interface to send the packets to the router.
- proto dhcp: The routing protocol identifier. DHCP means the routes will be determined dynamically.
- metric 100: An indication of the preference of the route compared to others. Routes with lower metrics are preferentially used over those with higher metrics. You can use this to give preference to a wired network interface over a Wi-Fi one.
The second route governs traffic to the IP range of 169.254.0.0/16. This is a zero-configuration network , which means it tries to self-configure for intranet communication. However, you can't use it to send packets outside the immediate network.
The principle behind zero-configuration networks is they don't rely on DHCP and other services being present and active. They only need to see TCP/IP in order to self-identify to each of the other devices on the network.
Let's take a look:
- 169.254.0.0/16: The range of IP addresses this routing rule governs. If the computer communicates on this IP range, this rule cuts in.
- dev enp0s3: The network interface the traffic governed by this route will use.
- scope link : The scope is link , which means the scope is limited to the network to which this computer is directly connected.
- metric 1000 : This is a high metric and isn't a preferred route.
The third route governs traffic to the IP address range of 192.168.4.0/24. This is the IP address range of the local network to which this computer is connected. It's for communication across, but within, that network.
Let's break it down:
- 192.168.4.1/24: The range of IP addresses this routing rule governs. If the computer communicates within this IP range, this rule triggers and controls the packet routing.
- dev enp0s3: The interface through which this route will send packets.
- proto kernel: The route created by the kernel during auto-configuration.
- scope link: The scope is link , which means the scope is limited to the immediate network to which this computer is connected.
- src 192.168.4.26: The IP address from which packets sent by this route originate.
- metric 100: This low metric indicates a preferred route.
If you want to focus on the details of a particular route, you can add the list option and IP address range of the route to the command as follows:
ip route list 192.168.4.0/24
We just added a new network interface card to this computer. We type the following and see it's showing up as enp0s8 :
We'll add a new route to the computer to use this new interface. First, we type the following to associate an IP address with the interface:
sudo ip addr add 192.168.121.1/24 dev enp0s8
A default route using the existing IP address is added to the new interface. We use the delete option, as shown below, to delete the route and provide its details:
sudo ip route delete default via 192.168.4.1 dev enp0s8
We'll now use the add option to add our new route. The new interface will handle network traffic in the 192.168.121.0/24 IP address range. We'll give it a metric of 100; because it will be the only route handling this traffic, the metric is pretty much academic.
sudo ip route add 192.168.121.0/24 dev enp0s8 metric 100
Now, we type the following to see what it gives us:
Our new route is now in place. However, we still have the 192.168.4.0/24 route that points to interface enp0s8 — we type the following to remove it:
sudo ip route delete 192.168.4.0/24 dev enp0s8
We should now have a new route that points all traffic destined for IP range 192.168.121.0/24 through interface enp0s8 . It should also be the only route that uses our new interface.
We type the following to confirm:
The great thing about these commands is they're not permanent. If you want to clear them, just reboot your system. This means you can experiment with them until they work the way you want. And it's a very good thing if you make a terrible mess of your system — a simple reboot will restore order.
On the other hand, if you want the changes to be permanent, you have to do some more work. Exactly what varies depending on the distribution family, but they all involve changing config files.
This way, though, you can test-drive commands before you make anything permanent.
- PRO Courses Guides New Tech Help Pro Expert Videos About wikiHow Pro Upgrade Sign In
- EDIT Edit this Article
- EXPLORE Tech Help Pro About Us Random Article Quizzes Request a New Article Community Dashboard This Or That Game Popular Categories Arts and Entertainment Artwork Books Movies Computers and Electronics Computers Phone Skills Technology Hacks Health Men's Health Mental Health Women's Health Relationships Dating Love Relationship Issues Hobbies and Crafts Crafts Drawing Games Education & Communication Communication Skills Personal Development Studying Personal Care and Style Fashion Hair Care Personal Hygiene Youth Personal Care School Stuff Dating All Categories Arts and Entertainment Finance and Business Home and Garden Relationship Quizzes Cars & Other Vehicles Food and Entertaining Personal Care and Style Sports and Fitness Computers and Electronics Health Pets and Animals Travel Education & Communication Hobbies and Crafts Philosophy and Religion Work World Family Life Holidays and Traditions Relationships Youth
- Browse Articles
- Learn Something New
- Quizzes Hot
- This Or That Game New
- Train Your Brain
- Explore More
- Support wikiHow
- About wikiHow
- Log in / Sign up
- Computers and Electronics
- Operating Systems
How to Assign an IP Address on a Linux Computer
Last Updated: July 28, 2022 Tested
Debian, Ubuntu, & Linux Mint
Red hat, centos, & fedora.
This article was co-authored by wikiHow staff writer, Jack Lloyd . Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. The wikiHow Tech Team also followed the article's instructions and verified that they work. This article has been viewed 715,828 times. Learn more...
This wikiHow teaches you how to assign a new IP address to your computer when using Linux. Doing so can prevent connection issues for the item in question.
- Press Ctrl + Alt + T or Ctrl + Alt + F1 (if you're on a Mac, substitute the ⌘ Command key for Ctrl .
- Click the text box at the top or bottom of the screen if possible.
- Open the Menu window and find the "Terminal" application, then click on it.
- A "root" account is the Linux equivalent of an Administrator account on a Windows or Mac computer.
- The top item should be your current router or Ethernet connection. This item's name is "eth0" (Ethernet) or "wifi0" (Wi-Fi) in Linux.
- In most cases, this is the "eth0" or "wifi0" item.
- To assign an IP of "192.168.2.100" to your ethernet connection ("eth0"), for example, you'd enter sudo ifconfig eth0 192.168.0.100 netmask 255.255.255.0 here.
- If you have a different DNS server address that you would rather use, enter that in the place of 22.214.171.124 .
- 5 Find the network connection that you want to change. This will normally be the Ethernet or Wi-Fi connection, which has an IP address currently listed on the right side of the window.
- For a network named "eno12345678", for example, you'd enter vi ifcfg-eno12345678 here.
- BOOTPROTO - Change dhcp to none
- Any IPV6 entry - Delete any IPV6 entries entirely by moving the cursor to the I on the left and pressing Del .
- ONBOOT - Change no to yes
- For example: to use "192.168.2.23" as your IP address, you'd type in IPADDR=192.168.2.23 and press ↵ Enter .
- Type in PREFIX=24 and press ↵ Enter . You can also enter NETMASK=255.255.255.0 here.
- Type in GATEWAY=192.168.2.1 and press ↵ Enter . Substitute your preferred gateway address if different.
Video . by using this service, some information may be shared with youtube..
- Some very specific Linux distributions will require you to go through a different process to assign an IP address. To see your specific distribution's specifications, check online. Thanks Helpful 0 Not Helpful 0
- Don't forget to switch back to the regular (non-root) user account when you're done. Thanks Helpful 1 Not Helpful 1
You Might Also Like
- ↑ https://danielmiessler.com/study/set_ip/
- ↑ https://www.youtube.com/watch?v=oQd5eG9BZXE&t=
About This Article
- Send fan mail to authors
Reader Success Stories
Jan 27, 2017
Is this article up to date?
Oct 10, 2017
- Do Not Sell or Share My Info
- Not Selling Info
Keep up with the latest tech with wikiHow's free Tech Help Newsletter
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can I setup a static IP address for my Debian Virtual Machine?
I have already set a static IP for a virtual machine in a private network in my school's laboratory. However, if I follow the same steps at home I cannot set a static IP for my Debian Virtual Machine.
My etc/network/interfaces file is configured like this:
Once I restart my machine, and after I type ifconfig in the terminal, I see that my IP address is 192.168.1.59, but I cannot ping any website, such as google.com. I get a message that reads 'unknown host google.com'.
What should I do to set a static IP address then?
I will thank you for any help you can provide.
- More information is required. Does it work with DHCP? What do you use for virtualization? Virtualbox? Your syntax looks correct. – Mikael Kjær Apr 3, 2017 at 8:34
- Does you home network actually use that address range? Do you actually have a gateway that is reachable by that address? Currently your DNS configuration might be missing (in addition). – Seth Apr 3, 2017 at 8:36
- @MikaelKjær, What do you mean if it works with DHCP? If I understand correctly, by setting a static IP address, I am avoiding using DHCP. Otherwise, my file would have a line that reads iface eth0 inet dhcp . And yes, I'm using Virtualbox. – David Apr 3, 2017 at 8:37
- @Seth, my gateway does have that IP address, and all my devices connected to my home network currently have an IP address such as 192.168.1.x – David Apr 3, 2017 at 8:38
- @Seth, I just checked the DNS configuration. That was the problem. All I had to do was add the final line dns-nameservers 192.168.1.254 Thank you very much. – David Apr 3, 2017 at 8:46
The host was unreachable because no DNS server was specified.
The configuration file must be the following (as long as your gateway and nameserver have the same IP address)
You must log in to answer this question.
Not the answer you're looking for browse other questions tagged networking virtualbox debian static-ip ..
- The Overflow Blog
- Build vs. buy doesn't matter. Tool adoption does. sponsored post
- CEO update: Giving thanks and building upon our product & engineering foundation
- Featured on Meta
- Update: New Colors Launched
- Incident update and uptime reporting
Hot Network Questions
- Why don't PC makers lock the bootloader?
- Why does ATTAPL's linear product introduction rule not delete the objects from the context?
- How many Americans support leveling Gaza?
- Term for deformation due to gravity
- Decode the date in Christmas Eve format
- Image Processing Application in C
- Multiple columns alignment
- How to extract coefficients and powers from expressions with non integer powers?
- Can co-author do the presentation in conference
- Problem with alignment with wrapfigure
- Could genetically engineered mint take over the planet?
- Is this a known scam?
- Two cats and one dog (were/was)
- Turn 1111 into zero
- Is it illegal for King Charles not to vote in Australia?
- Is "Mutually Assured Destruction" still valid considering so many conventional missiles are currently getting shot down?
- Can we add treadmill-like structures over the airplane surfaces to reduce friction, decrease drag and producing energy?
- I need help identifying this "Mystery Bike" (could possibly be a real ferrari?)
- Did Netanyahu express support of Hamas in 2019?
- "The printer is exposed to strong light" error on Epson XP-640
- Does one need to have an interline ticket (connecting ticket) to be allowed a 144-hour visa-free transit in China? Or does any onward ticket suffice?
- Short story identification: misquotation of A Tale of Two Cities ending
- Why are statements from the "Gaza Health Ministry" taken without a grain of salt?
- Is it legal to bribe a private eye?
Deploy your Cloud Server now and get $100 in Free Credits!
- 5 Best practices for configuring and managing a Load Balancer
- 5 Most Effective Ways to Avoid Cloud Bill Shocks.
- 6 Benefits of Deploying a Load Balancer on your server.
- 6 Cloud Computing Myths, Busted!
- 7 Reasons Why Cloud Infrastructure is Important for Startups
- Advantages and Challenges of Developing Cloud-Native Applications
- Advantages and Challenges of Implementing a Hybrid Cloud Solution
- Advantages and challenges of implementing edge computing in your organization
- Advantages and Challenges of Using AI and Machine Learning in the Cloud
- Advantages and Challenges of Using Cloud-Based Analytics Tools
- Advantages and Challenges of Using Kubernetes and Containers in the Cloud
- Benefits of Cloud Computing for Small Businesses
- Benefits of using Cloud Servers compared to Physical Servers
- Best Cloud Platform for Your Business
- Best Practices for Implementing Serverless Computing in Your Organization
- Best Practices for Managing and Securing Edge Computing Devices
- Best VPS Hosting Providers in 2023
- Can Artificial Intelligence Replace Teachers? The Future of Education with AI
- Challenges of Cloud Server Compliance
- Compliance in the Cloud: Understanding Your Responsibilities
- Deploying and Managing a Cluster on Utho Kubernetes Engine (UKE)
- Edge Computing: A User-Friendly Explanation
- Ethics and Regulation of AI: The Next Frontier for Artificial Intelligence
- How Cloud Firewall Can Help You to Avoid Costly Data Breaches.
- How SSL Certificates Keep You and Your Business Secure from Cyber Attacks.
- How to Choose a Best Cloud Hosting Provider
- How to Choose the Right Kubernetes Solution for Your Business
- How to Choose the Right Multi-Cloud Management Tool for Your Business
- How to keep your Business Documents Safe from Online Threats
- Impact of Cloud Server Energy Consumption
- Impact of Cloud Server Location on Latency
- Instructions for Migrating to a Utho Cloud Environment
- Introduction to AI and Machine Learning in the Cloud: What Are They and How Do They Work?
- Introduction to Big Data Analytics in the Cloud: What are the Benefits?
- Multi-Cloud Strategy: Everything You Need to Know
- Pros and Cons of Using Serverless Computing in Your Business
- Public VS Private VS Hybrid Cloud: Which is Right for Your Business?
- serverless computing: What is it and how does it work?
- The Dark Side of Cloud Servers: Risks and Threats
- The Future of Cloud Server Management
- The Future of Kubernetes: What to Expect in 2023 ?
- The Impact of Cloud Server Downtime on Business Operations
- The Importance of Hosting Your Website on a Cloud Server
- The Pros and Cons of Multi-Cloud Server strategy
- The Role of Cloud Servers in Edge Computing
- Top 05 Cloud Security Threats in 2023 and Proven Strategies to Mitigate Them
- Top 10 Factors to Consider When Choosing a Cloud Server Provider
- Unleashing the Power of Artificial Intelligence: What AI Can Do with Utho Cloud
- VPS Hosting: A Beginner’s Guide to Virtual Private Servers
- What is a Cloud Server ?
- What is a Cloud Service Provider?
- What is a Hybrid Cloud and why is it Important?
- What is Cloud-Native Application Development and Why is it Important?
- What is Kubernetes and Why is it important?
- What is VPN and how can it benefit your business?
- When Was Artificial Intelligence Invented?
- Why Artificial Intelligence is Important
- Why Firewalls Are Important For Your Business || Benefits of Using a Firewall
- Why Ransomware Attacks Are Rising and How You Can Protect Your Business.
- Will Artificial Intelligence Replace Humans?
- Show all Docs ( 45 ) Collapse Docs
- How To Configure BIND as a Private Network DNS Server on CentOS 7
- How to Install and Configure PowerDNS on centos 7 using MariaDB.
- 2 Methods for Re-Running Last Executed Commands in Linux
- 4 Effective Ways to Determine the Name of a Plugged USB Device in Linux
- An introduction to the Linux alternatives command
- Archiving and Compressing files with GNU Tar and GNU Zip
- Change SSH Default Port 22 to Custom Port
- Cheat sheet for 15 nmcli commands in Linux (RHEL/CentOS)
- Command-line internet speed tests in CentOS 7
- convert rwx permissions to octal format in Linux
- Create a Zabbix action to deliver an alert message to the user
- Deploy Django Applications Using Nginx and uWSGI on Ubuntu 14.04
- Determine All IP Addresses of Live Hosts Connected to the Network in Linux
- Disable reboot using Ctrl-Alt-Del Keys in RHEL / CentOS 7/8
- Disable SSH root login in Centos 7
- Download Online Resources from the Command Line with wget
- Explanation of iftop command
- Explanation of less, more and most command in Linux
- Explore Metabase data using MySQL
- Find multiple Ways to User Account Info and Login Details in Linux
- For Application Data Storage on Fedora 14, Use MongoDB
- Getting Started with SELinux
- How do I find my Apache version in Plesk
- How do we install MySQL Workbench on Ubuntu 18.04?
- How to access CentOS terminal by browser: Shellinabox
- How to access IBM WAS admin console
- How to access Linux server using SSH in Windows, Linux and Mac OS.
- How to access Ubuntu terminal by browser: Shellinabox
- How to add a swap file in Linux
- How to Add a User and Grant Root Privileges on CentOS 7
- How To Add a User and Grant Root Privileges on Ubuntu 18.04
- How to Add a User to Sudoers in Ubuntu 18.04
- How to add FTP account in plesk
- How To ADD OR DELETE DOMAINS AND SUBDOMAIN IN PLESK
- How to add or remove a User from a Linux Group
- How To Add User to Sudoers or Sudo Group in CentOS 7
- How to Allow Remote Connections to MySQL in centos
- How to Block and unblock Ip in CSF-WHM/Cpanel
- How to Build Brotli From Source on CentOS 7
- How to Build Brotli From Source on Debian 9
- How to Build Brotli From Source on Fedora
- How to Build Brotli From Source on Ubuntu 20.04 LTS
- How to change apache2 web folder in Ubuntu
- How to change date and time in Linux
- How to Change Default Port of Apache On RHEL/CentOS 7
- How to change mysql port number in centOS 7
- How to change SSH port when SELinux policy is enabled
- How to check and analyze packets by tcpdump command
- How to Check Disk Performance (IOPS and Latency) in Linux?
- How to check Disk Speed (Read/Write) HDD, SSD Performance in CentOS 7
- How to check, disable and enable PHP modules.
- How to Compress a.bz2 File and How to Uncompress It
- How to configure an external SMTP server in Plesk
- How To Configure SFTP Server In Debian
- How to configure SFTP server on Debian 12
- How to Connect Node.js Application with MongoDB on CentOS
- How To Create a New User and Grant Permissions in MySQL
- How to create an email account in Plesk And set email forwarding
- How to Create Email Accounts in cPanel
- How to Create Hard and Symbolic Links
- How To Create Temporary and Permanent Redirects with Apache on Ubuntu
- How to Create, Encrypt, and Decrypt Random Passwords in Linux
- How to enable RDP in Ubuntu OS (Tasksel)
- How to Execute a Command with a Timeout in Linux
- How to Extract and Download Tar Files with a Single Command
- How to Find and Sort Files in Linux Based on Modification Date and Time
- How to fix "Command not found" error in CentOS
- How to host a domain on centos 7
- How to host node.js application on Plesk
- How To Import and Export Databases in MySQL or MariaDB
- How to increase and decrease the LVM size
- How to Install (Linux, Apache, MariaDB, PHP) LAMP Stack on CentOS 7
- How To Install a PHP Version in WHM
- How to install aaPanel on Centos 7 by one click
- How to install aaPanel on Debian by one click
- How to install aaPanel on Fedora by one click
- How to install aaPanel on Ubuntu by one click
- How to Install Anaconda on centos 7
- How to Install Anaconda on Debian
- How to Install Anaconda on Fedora
- How to Install Anaconda on Ubuntu 20.04 LTS
- How To Install and Configure pgAdmin 4 on Ubuntu 22.04
- How to install and configure Redis on Ubuntu 22.04
- How To Install and Manage Supervisor
- How to Install and Use AIDE on RHEL/CentOS 7/8
- How to Install and Use Apache Cassandra on Ubuntu 20.04 LTS
- How to install and use ChatGPT in Linux
- How to install Apache on CentOS 7
- How to install Atom Text Editor on Debian 10
- How to install Atom Text Editor on Debian 12
- How to install Atom Text Editor on Ubuntu 22.04
- How to install Certbot on AlmaLinux 8
- How to install Certbot on AlmaLinux 9
- How to install Certbot on CentOS 7
- How to install Certbot on Fedora
- How to Install ClipGrab on Ubuntu 20.04 LTS to Download YouTube Videos
- How to install Cockpit on Debian
- How to install Cockpit on Fedora Server
- How to install Cockpit on Ubuntu server
- How to Install Cockpit Web Console in CentOS 7.7
- How to install Composer on Almalinux 8
- How to install Composer on CentOS server
- How to install Composer on Debian servers
- How to install Composer on Fedora
- How to install Composer on Ubuntu 20.04
- How to install CSF in cPanel
- How to install CWP in Centos 7
- How to Install CyberPanel on CentOS 7
- How to install Django on Debian server
- How to install Django on RockyLinux 8
- How to Install Django on Ubuntu 22.04
- How to install Docker on AlmaLinux 8
- How To Install Docker on Centos 7
- How To Install Docker on Debian
- How To Install Docker on Fedora
- How to install Docker on Fedora
- How To Install Docker on Ubuntu 20.04
- How To Install Docker on Ubuntu 22.04
- How to install Drupal on CentOS server
- How to Install Drupal on Debian
- How to install Drupal on Fedora
- How to Install Drupal on Ubuntu server
- How to Install Elasticsearch on CentOS 7
- How to install Elinks on AlmaLinux
- How to install Elinks on CentOS
- How to install Elinks on Debian
- How to install Elinks on Fedora
- How to install Elinks on Ubuntu
- How to install Flatpak on Debian
- How to install Flatpak on Debian 12
- How to install Flatpak on Fedora 35
- How to install Flutter on Debian
- How to install Flutter on RockyLinux 8
- How to install Flutter on Ubuntu 20.04 LTS (Focal Fossa)
- How to Install FTP on CentOS 7 and access server via Filezilla Client
- How to install Gawk on CentOS
- How to install Gawk on Debian 10
- How to install Gawk on Debian 12
- How to install Gawk on Debian 9
- How to Install Gawk on Ubuntu 20.04
- How to install Gawk on Ubuntu 22.04
- How to install Git on AlmaLinux 8
- How to install Git on CentOS 7
- How to install Git on Debian 10
- How to install Git on Debian 12
- How To Install Git on Fedora
- How to install Git on Fedora
- How to Install Git on Ubuntu 20.04
- How to install Git on Ubuntu 22.04
- How to install GitLab on AlmaLinux 8
- How to install GitLab on CentOS 7
- How to install GitLab on Debian 10
- How to install GitLab on Debian 11
- How to install GitLab on Debian 12
- How to install GitLab on Ubuntu 22.04
- How to install GNOME Desktop (GUI) on CentOS 7
- How to install GO on Alma Linux
- How to install Go on CentOS
- How to install Go on Debian 10
- How to install Go on Debian 12
- How to install GO on Fedora
- How to install GO on Rocky Linux
- How to install Go on Ubuntu 22.04
- How to install Gogs on Debian
- How to install Gogs on Debian 12
- How to install Gogs on Ubuntu 20.04
- How to install Gogs on Ubuntu 22.04
- How to install Google authenticator on Centos
- How to install Gradle on AlmaLinux 8
- How to install Gradle on CentOS 7
- How to install Gradle on Debian 10
- How to install Gradle on Debian 12
- How to install Gradle on Debian 9
- How to install Gradle on Fedora
- How to install Gradle on Ubuntu 20.04
- How to install Grafana On Almalinux 8
- How To Install Grafana on Centos 7
- How To Install Grafana on Fedora 35/34/33/32/31
- How to Install Grafana on Ubuntu 20.04
- How to install Hastebin on Debian 10
- How to Install Hastebin on Ubuntu 20.04
- How to Install HTMLDoc on Centos 7
- How to Install HTMLDoc on Debian 10
- How to install HTMLDoc on Debian 12
- How to Install HTMLDoc on Debian 9
- How to Install HTMLDoc on Fedora
- How to Install HTMLDoc on Ubuntu 20.04
- How to install IBM Installation Manager in Linux
- How to install Java on Almalinux 8
- How To Install Java on CentOS server
- How To Install Java on Fedora server
- How to install Jenkins on CentOS 7
- How to install Jenkins on Debian 10
- How to install Jenkins on Fedora server
- How to install Jenkins on Ubuntu 20.04
- How to Install Jshon on Ubuntu 20.04
- How to Install KDE Desktop(GUI) on CentOS 7
- How to Install KubeSphere on Ubuntu 22.04
- How to install LAMP on Ubuntu 18.10
- How to install Laravel Application on Plesk server
- How to Install Latest MySQL 5.7 on CentOS 7
- How to install latest versions of PHP on CentOS
- How to install LEMP on ubuntu 18.04
- How to install LEMP on Ubuntu 22.04
- How to install LEMP stack on centOS 7
- How to install Lighttpd, MariaDB and PHP on Ubuntu 20.04
- How to install MailCatcher On Ubuntu 22.04
- HOW TO INSTALL MARIADB 10.3 ON CENTOS 7
- How to Install MariaDB 10.3 on Ubuntu 20.04
- How To Install MariaDB 10.7 on CentOS 7
- How to Install MariaDB 10.7 on Fedora
- How to install MariaDB 11 on Debian 10
- How to install MariaDB 11 on Debian 9
- How to install MariaDB 11 on Ubuntu 22.04
- How To Install MariaDB on Debian 10
- How To Install MariaDB on Debian 11
- How To Install MariaDB On Ubuntu 18.04
- How To Install MariaDB on Ubuntu 22.04
- How to install Maven on Debian
- How to install Maven on Ubuntu
- How to install Minikube on CentOS 7 and 8
- How to install Minikube on Debian
- How to install Minikube on Fedora server
- How to Install Minikube on Ubuntu server
- How to install MongoDB on AlmaLinux 8
- How to Install MongoDB on CentOS
- How to Install MongoDB on Debian
- How to Install MongoDB on Fedora 36/35/34
- How to install mongodb on Ubuntu 18.10
- How to Install MongoDB on Ubuntu 20.04
- How to install Multicraft on Ubuntu 20.04
- How to Install MySQL on Ubuntu 20.04
- How to install MySQL Relational Databases on Fedora 12
- How to Install Ncurses Library on Ubuntu 20.04
- How to Install Neofetch on Ubuntu 20.04 LTS
- How to Install netstat on Ubuntu 20.04 LTS
- How to install NGINX Web Server on Debian 10
- How to install NGINX Web Server on Debian 12
- How to Install Node.js and npm on Ubuntu 20.04
- How To Install Node.js on CentOS 8
- How To Install Node.js on Ubuntu 20.04
- How to Install Ntopng on Debian
- How to Install Ntopng on Fedora
- How to Install Ntopng on Ubuntu 20.04
- How to install OwnCloud on CentOS
- How to install OwnCloud on Debian server
- How to install Owncloud on RHEL 8
- How to install OwnCloud on Ubuntu server
- How to Install PHP 7.4 in CentOS 7
- How to install PHP 7.4 on AlmaLinux 8
- How To Install PHP 7.4 on Debian 10
- How to install PHP 7.4 on Debian 12
- How to install PHP 7.4 on Fedora 34
- How To Install PHP 7.4 on Fedora 36/35/34/33/32/31
- How to install PHP 7.4 on Ubuntu 20.04
- How to install PHP 8 on AlmaLinux 8
- How to Install PHP 8 on Centos 7
- How to Install PHP 8 on Debian 10
- How to Install PHP 8 on Debian 12
- How to Install PHP 8 on Debian 9
- How to install PHP 8 on Fedora 38
- How to Install PHP 8 on Ubuntu 20.04
- How to Install PHP 8 on Ubuntu 22.04
- How To Install PHP 8.0 on Fedora 32
- How To Install PHP 8.0 on Fedora 33
- How To Install PHP 8.0 on Fedora 34
- How To Install PHP 8.0 on Fedora 35
- How To Install PHP 8.0 on Fedora 36
- How to install PHP 8.1 on Ubuntu 22.04
- How to install PHP 8.2 on Ubuntu 22.04
- How to Install PHP in CentOS 7
- How to install PHP on CentOS 7
- How to install PHP on Ubuntu 18.04
- How to install phpMyAdmin on CentOS
- How to install phpMyAdmin on Linux
- How to Install Podman on Ubuntu 20.04 LTS
- HOW TO INSTALL POSTGRES DATABASE IN CENTOS 7
- How to Install PostgreSQL 15 on Ubuntu 22.04
- How to install Postman on Centos 7
- How to install Postman on Debian
- How to install Postman on Debian 12
- How to install Postman on Fedora
- How to install Postman on Ubuntu 20.04
- How to install Python on Ubuntu 22.04
- How to install R on Ubuntu 22.04
- How to install Red5 Server on Ubuntu 22.04
- How to install Redis on CentOS
- How to install Redis on Debian
- How to install Redis on Fedora
- How to install Redis on Ubuntu
- How to install Rkhunter on Ubuntu 22.04
- How to install Shellinabox on Debian server
- How to install Shellinabox on Fedora
- How to install Snap on AlmaLinux
- How to install SNAP on Debian 10
- How to install Snap on Fedora
- How to install Snap on RockyLinux
- How to Install Spack on Ubuntu 20.04
- How to install squid proxy on Ubuntu server
- How to Install Squid Proxy Server on CentOS
- How to install SSL on CentOS-7.3 with httpd server
- How to install SSL on Centos-7.3 with Nginx server
- How to install SSL on Ubuntu with Apache2
- How to install SSL through Cpanel .
- How to Install Streamlit on Ubuntu 20.04
- How to install Streamlit on Ubuntu 22.04
- How to install tcpping on AlmaLinux
- How to install tcpping on CentOS
- How to install tcpping on Debian
- How to install tcpping on Fedora
- How to install tcpping on Ubuntu
- How To Install the Latest MySQL on Debian 10
- How to Install the OpenGL Library on Ubuntu 20.04
- How to Install TinyCP on Debian
- How to Install TinyCP on Debian 12
- How to Install TinyCP on Ubuntu 20.04
- How to Install TinyCP on Ubuntu 22.04
- How to install Tomcat 10 on Ubuntu server
- How to Install Vagrant on Ubuntu 20.04 LTS
- How to install Vagrant on Ubuntu 22.04
- How to Install Varnish Cache with Apache on CentOS 7
- How to install Visual Studio Code on Debian 10
- How to install Visual Studio Code on Ubuntu 22.04
- How to install VnStat Network Monitoring on CentOS 7
- How to install Webmin on AlmaLinux 8
- How to install Webmin on Centos 7
- How to install Webmin on Debian
- How to install Webmin on Debian 12
- How to install Webmin on Fedora
- How to install Webmin on Ubuntu 20.04
- How to Install Webuzo
- How to Install Webuzo on Debian
- How to Install Webuzo on Fedora
- How to Install Webuzo v3 on Ubuntu 20.04
- How to Install Wekan on Debian 10
- How to Install Wekan on Debian 12
- How to Install Wekan on Ubuntu 20.04
- How to install Wine on Alma Linux
- How to install Wine on RockyLinux 8
- How to Install Wine on Ubuntu 20.04
- How to Install wmclock on Ubuntu 20.04
- How to install Wordpress with LEMP on CentOS server
- How to Install WordPress with LEMP on Ubuntu
- How to Install Xrdp Server (Remote Desktop) on Ubuntu 20.04
- How to Install Xrdp Server on Ubuntu 22.04
- How to install Zabbix 4.4 in CentOS 7
- How To Install Zabbix Agent On Centos 7
- How to install Zimbra on Ubuntu 20.04 LTS
- How to Locate Files That Have SUID and SGID Permissions
- How to Make a Large File in Linux
- How to Make a Linux User Change Their Password Upon Login?
- How To Migrate a MySQL Database Between Two Servers
- How to migrate from CentOS 8 to Arch Linux 8.7
- How to Mount Disk in Linux
- How To Move a PostgreSQL Data Directory to a New Location on Ubuntu 22.04
- How To Partition and Format Storage Devices in Linux
- How to prevent a user from login in Linux
- How to Prevent File and Directories from Being Deleted, Even by Root
- How to Protect your Web Sites by using Username and password in Apache on CentOS.
- How to Protect your Web Sites by using Username and password in Apache on Ubuntu.
- How to Real-Time Monitor TCP and UDP Ports
- How to Recognize Active Directories Using Shell Variables and Characters
- How to remove FTP account in plesk
- How to reset forgotten root password in centos 7/8
- How to reset forgotten root password in Debian
- How to reset forgotten root Password in Fedora 34.
- How to reset forgotten root password in ubuntu 16/18
- How to reset the MySQL root password in CentOS 7
- How To Reset Your MySQL or MariaDB Root Password on Ubuntu 18.04
- How to run different websites with different versions of PHP
- How to Save a Command Output to a File in Linux
- How to Schedule an Activity at a Specific Time or at a Time in the Future Using the 'at' Command
- How to schedule your task using crontab
- How to send an E-mail from CentOS 7
- How to Set Manual or static IP Address on CentOS
How to Set Manual or static IP Address on Debian server
- How to Set Manual or static IP Address on Fedora
- How to Set Manual or static IP Address on Ubuntu server
- How To Set or Change Timezone on Ubuntu 20.04
- How to set up a node.js application with apache on CentOS7
- How to Set Up SSH Keys on Ubuntu 20.04
- How to Setup and Configure FirewallD on CentOS 7
- How to Setup Flatpak on Ubuntu 20.04
- HOW TO SETUP LOAD BALANCER FOR APPLICATIONS RUNNING ON CUSTOM PORT
- How to Setup NFS server on CentOS
- How to setup Rsyslog server on Ubuntu 22.04
- How to Setup SFTP User Account on Fedora
- How to Setup SFTP User Account on Ubuntu 20.04
- How to Setup SFTP-only User Account on CentOS 7
- How to setup SSH Tunneling or port forwarding in Linux
- How to solve "Cannot connect to CWP Admin Panel"
- How to solve Zimbra error "message does not meet IPv6 sending guidelines regarding PTR"
- How to Start, Stop, and Restart MySQL Server on centos 7
- How to Switch (su) to a Different User Account Without a Password
- How to Test Internet Speed on Almalinux 8
- How to test internet speed on Debian 10
- How to test internet speed on Debian 12
- How to Test Internet Speed on Fedora
- How to Test Internet Speed on Ubuntu 20.04
- How to Troubleshoot with nmap in centos
- How to Update or Upgrade CentOS 7.1, 7.2, 7.3, 7.4, 7.5, or 7.6 to CentOS 7.7
- How to upgrade mysql 5.7 to 8.0 in Ubuntu 16.04
- How to use 'chage' command in Linux
- How to use 'ps' command in Linux
- How to Use ‘at’ Command to Schedule a Task in Linux
- How to Use Iperf to Test Network Performance
- How to use IPTABLES firewall in Linux
- How to use lsyncd to sync directories on Centos
- How to use MTR command in Linux
- How To Use Nmap to Scan for Open Ports
- How To Use ps, kill, and nice to Manage Processes in Linux
- How To Use Rsync to Sync Local and Remote Directories
- How to Use the SMTP Server of Google
- How to Verify Your Application is Listening on the Correct Port
- How To View and Update the Linux PATH Environment Variable
- How to View Colored Man Page Documentation in Linux
- How-to-set-up-a-node-js-application with apache on-centos-7
- Install Apache 2 Web Server in CentOS 5
- Install IBM HTTP server in Linux
- Install IBM Websphere Application Server ( IBM WAS) in Linux
- Install multiple version of PHP on Ubuntu server
- Install Plesk on CentOS 7
- Install SSL on Ubuntu server using Nginx
- Install WHM/Cpanel in Centos 7
- INSTALLATION AND CONFIGURATION OF APACHE TOMCAT 9 ON CENTOS 7
- Installing MongoDB on CentOS 7
- Installing PostgreSQL on Ubuntu 20.04: Step-by-Step Instructions
- Introduction to rsync
- Learning the Linux Alias Command and How to Use It
- Linux port test commands(RedHat 7, CentOS 7, and Ubuntu 18.04)
- Linux Top Command
- Linux: How to Execute a Command with a Time Limit or Timeout
- Logical volume manager in linux (LVM) Guide for beginners
- MariaDB installation on CentOS 8
- Methods for Disabling the Root Account in Linux
- Migrate your Google Cloud Platform to Microhost Cloud
- Modify File Permissions with chmod
- Most Common Network Port Numbers for Linux
- Multiple User Account Creation in Linux
- Mysql 1030 got error 28 from storage engine
- MySQL Relational Databases on Ubuntu 12.04
- Nginx and PHP-FastCGI in Arch Linux
- NGINX Installation in CentOS 7
- NTP Server Configuration
- Python 3 Installation and Programming Environment Configuration on an Ubuntu 22.04
- Recover forgotten password of admin user in Jenkins
- Set a date and time for each command in Bash History.
- Setup Software RAID on Linux server
- Speed Test in Ubuntu server
- SSH and SCP command in Linux
- SSH Logins with Banner Messages (Issue.net)
- SSH Logins with Banner Messages (MOTD File)
- Structure Of Apache Configuration
- The 'cat' and 'tac' Commands in Linux: A Step-by-Step Guide with Examples
- Update DNS records For A Domain Using Plesk
- Update PHP 5.4 version to PHP 7.4
- Upgrading WordPress Manually on Linux sever
- URLs Redirect with Apache Web Server
- User Group and File permission in Linux
- Using Fedora 20 MySQL Relational Databases
- Using mysqldump to Backup MySQL Databases
- Using the Carat () Symbol, you can easily correct a previous command's typo.
- Using the Terminal in Linux to Examine the Website's Loading Time
- Using the yum command, install Google Chrome on CentOS 7.
- VirtualHost creation in Tomcat 10/9/8/7
- What are Runlevels in Linux and its understanding
- What is Hugo and How to use it
- What is IAAS, PAAS and SAAS
- What is IOSTAT command and how to use it
- Why less is Faster Than more Command for Effective File Navigation
- Show all Docs ( 457 ) Collapse Docs
- How to create user and give limited permission to the host in Zabbix
- Deploy a new server with snapshot
- DNS Management
- How to access a server through password-less authentication
- How to add additional storage in the Microhost Cloud Server
- How to check Bandwidth consumption in Microhost panel
- How to create Microhost cloud server
- How to deploy a cloud server with custom ISO
- How to destroy MicroHost cloud server
- How to enable weekly backup in Microhost Cloud server
- How to install Wine on RHEL 8
- How to rebuild Microhost Cloud Server
- How to resize (upgrade/downgrade) cloud server.
- How to take snapshot of a Microhost Cloud Server
- Microhost Cloud Firewall
- Steps to Activate Microhost VPN
- Show all Docs ( 1 ) Collapse Docs
- How to Configure NGINX
- How to install NGINX in Ubuntu 18.04 LTS
- Install and configure Nginx and PHP-FastCGI in Ubuntu 16.04
- NGINX : Enable TLS or HTTPS Connections
- NGINX: Installation and Basic Setup
- Use NGINX as a Reverse Proxy
- What is NGINX?
- Apache Virtual Hosts setup on CentOS 7
- Basics Information of Apache Configuration
- CHANGE AND UPDATE PASSWORD OF CPANEL ACCOUNT
- How to add A record in Plesk
- How to add CNAME record in Plesk
- How to add components in Plesk
- How to add MX record in Plesk
- How to add TXT record in Plesk
- How to assign permissions to Files and Folders in Plesk
- How to change NGINX port in Linux
- How to change PHP parameter manually through Plesk
- How to change the PHP version on Plesk
- How to change your Plesk password
- How to check current Disk Space in Plesk
- How to Configure ModSecurity in Apache
- How to configure MX record in MAILENABLE
- How to create a backup in Plesk
- How to create a MySQL/MariaDB Database and Database User in Plesk
- How to create a user role in Plesk
- How To Create an Account in CPanel with WHM
- How To create and connect an FTP Account in cPanel
- How to delete an Email account in Plesk
- How to do Server-wide blacklist in Plesk
- How to do Server-wide whitelist in Plesk
- How to enable IonCube Loader in Plesk
- How to Export and Import Database Dumps in Plesk
- How to install Joomla in Plesk
- How to Install NGINX Web Server on Ubuntu 22.04 LTS
- How to install WordPress in Plesk
- How to manage user roles in Plesk
- How to migrate accounts from CWP to CWP
- How to modify Database user privileges in Plesk
- How to remove components in Plesk
- How to Set Up the .htaccess File in Apache
- How to setup scheduled tasks in Plesk
- How to Solve "The server requested authentication method unknown to the client" in phpMyAdmin
- How to Start, Stop or Restart System Services in Plesk
- Installation of LAMP Stack on Ubuntu 16
- Managing Resources using Apache mod_alias
- Rewrite URLs using mod_rewrite and Apache
- Rule-based Access Control for Apache
- Tuning Of Your Apache Server
- Show all Docs ( 43 ) Collapse Docs
- How to add SSL biniding in windows server
- How to allocate unallocated disk space in Windows Server
- How to allow ICMPv4(PING) in Windows Firewall using PowerShell
- How to allow multiple RDP sessions for the single user in Windows Server
- How to Block or Allow TCP/IP Port in Windows Firewall
- How to Boot Windows Server into Safe Mode
- How to change default shell from cmd to PowerShell in Windows Server
- How to change RDP port in Windows Server
- How to change RDP port via PowerShell in Windows server
- How to configure a DNS Reverse Lookup Zone in Windows Server 2019
- How to Configure FTP Server on Windows Server 2019
- How to configure IP manually on Windows Server
- How to connect SFTP using FileZilla
- How to connect to a Windows server using Remote Desktop Protocol (RDP)
- How to Connect Virtual Server Remotely Using RDP in Windows OS
- How to Create Mailbox in MailEnable
- How to create RDP user in Windows Server 2012
- How to host a domain on Windows Server 2019
- How to Initialize and bring a disk online in Window Server
- How to Install & Configure Printer Tool in Windows Server
- How to install Active Directory Domain Service on Windows Server
- How to install Apache Tomcat 9 on Windows Server
- How to install IIS via Powershell in Windows Server
- How to install Java Development kit on Windows Server
- HOW TO INSTALL MAILENABLE ON WINDOWS SERVER
- How to install MsSQL Express Edition 2019 on Windows Server
- How to Install MultiPoint Services in Windows Server 2016
- How to install MySQL on Windows Server 2019
- HOW TO INSTALL ONE SSL CERTIFICATE ON TWO DIFFERENT WINDOWS SERVER
- How to Install OpenSSH on Windows Server
- How to install Python 3.7 on Windows Server 2012 R2, 2016, 2019, 2022 via PowerShell
- How to install SSL in Apache Tomcat in Windows Server
- How to Install SSL on Windows Server
- How to install Telnet Client on a server using Windows PowerShell
- How to Install Windows RDP CAL license in windows servers
- How to install Wordpress on IIS in WIndows Server 2019
- How to install XAMPP on Windows Server 2016/2019/2022
- How to make partition from existing drive Windows Server
- HOW TO MIGRATE THE ZIMBRA EMAILS ON PLESK PANEL USING EMAIL MIGRATOR
- How to mount NFS persistently in Windows Server
- How to mount Virtio ISO
- How To open a port in Windows Server Firewall
- How to reset a lost Administrator password in Windows Server
- How to setup Disk Driver while deploying Windows Server with custom ISO
- How to setup Network Driver while deploying Windows Server with custom ISO
- How to setup NTP Client for time synchronization using PowerShell
- How to setup NTP Server for time synchronization using Powershell
- How to Setup OpenVPN Connect in Windows Server
- How to setup SSH Server on Windows Server via PowerShell
- How to share a folder over network in Windows Servers
- How to solve internal server error while connecting to RDP
- How to Turn off Internet Explorer Enhanced Security Configuration on Windows Server
- How to upgrade TLS 1.1 to TLS 1.2 in window server
- How to upgrade Windows Server 2012R2 to Windows Server 2016
- How to use telnet, netstat and wireshark in Windows
- Install Plesk on Windows Server 2012
- Install SQL Server 2012 Express Edition in Windows Server 2012
- Installation and Configuration of IIS Web Server on Windows Server
- Mssql database backup restore script
- Windows Server Backup feature (2012R2, 2016, 2019)
- Show all Docs ( 47 ) Collapse Docs
In this article we will discuss about how to set Manual or static IP Address on Debian server, there will come a moment in your career as a Linux system administrator when you will be tasked with the responsibility of configuring networking on your machine. On desktop computers, you are able to utilise dynamic IP addresses; but, in order to set up a server architecture, you will need to configure a static IP address (at least in most cases).
The following information on Internet Protocol version 4 (IPv4) will be used so that we may accomplish the objectives of this tutorial.
Before doing anything, first check the network device name of your system, in which you want to set static ip.
To configure static IP address in Debian/ Ubuntu, open the following file:
You will see the below lines in the above opened file.
Change the line to the below code.
Save the file and exit the file.
Now make the required entry in /etc/resolv.conf file as follow
[/console]# vi /etc/resolv.conf [/console]
Now just down your network device and then up the same to made the changes reflected.
Now confirm whether your changes just reflected yet or not.
- manual ip on centos
- Manual ip on fedora
- menual ip on debian
- Set Manual or static IP Address
- static IP Address
- static ip on centos
- static ip on fedora
- Become an Author
How to set a static IP address on Debian 10 Buster?
In this opportunity, I will show you how to define a static IP address in Debian 10. With that, you will be able to give a specific IP address to your Debian team. Ideal if you are on a home network or for educational purposes.
What do you will learn in this post?
This is a post, quite simple to apply. If you keep reading, you will learn the following
- What is a static IP address?
- Advantages of having a server with a static IP address.
- How to define a static IP address in Debian 10 Buster?
On the other hand, if you do not have Debian 10 Buster installed yet, I recommend you to visit our post where we explain it in detail.
How to install Debian 10 Buster?
So, we can start now.
A Static IP address
An IP address is an identifier held by each device that connects to the Internet or a computer network. In the case of the Internet, it must be unique to avoid connection conflicts.
On the one hand, there are dynamic IP addresses that change their value from time to time. Normally, these addresses are assigned by a DCHP server . The sysadmin does not have to worry about the assigned address as they are renewed from time to time.
On the other hand, we have static or fixed IP addresses, which unlike dynamical ones, do not change over time. In this case, it must be assigned and configured manually in the system.
Each of them has its own advantages, however, for internal networks, it is convenient to have equipment with static IP addresses. This facilitates the administration and routing of packets within the network. It is also easier to maintain the network.
Now, I will show you how to define a static IP address in Debian 10.
How to set up a static IP address on Debian 10?
First, it is necessary to know which network interface we are going to configure. For this example, I will assume that we will configure the wired network interface.
Then, we verify the name of the interface with the following command:
The output will be something similar to this one:
There we will have the name of the network interfaces. The one that corresponds to the wired network is called enp0s3 . Something similar should be in your case.
And it has an IP address 192.168.250.15 . However, I always want the address to be 192.168.250.99 .
Now that we know the name of the interface, we need to edit the file /etc/network/interfaces .
On the line:
It says that it will configure the interface with DHCP i.e. for a dynamic IP address. It has to be changed to configure it in a static way. So, change it for this line:
The following connection parameters should then be added.
Remember that these parameters are as an example. You need to type the corresponding ones to your network.
After making the settings, it should look like this:
Next, restart the network service
Then, check the changes:
So, everything was fine.
Setting up a static IP address on Debian 10 is quite simple. However, you must have root privileges to do this. You can learn how to enable sudo in Debian 10 for that.
Ideally, you should have a static IP address for computers within an internal network to make them easier to handle.
Please share this post with your friends and join our Telegram channel .
Não funcionou. No meu caso pelo journal ele insiste em dizer que eu não mudei o nome da interface de eth0.
it works? address 192.168.250.99 ok netmask 255.255.255.0 (this subnet its wrong?) network 192.168.1.1 (the network is 192.168.250.0) broadcast 192.168.255.255 (the broadcast should be 192.168.250.255) gateway 192.168.1.1
Yeah, man. In my case, everything works properly. This is due to the original configuration of my network.
LEAVE A REPLY Cancel reply
Save my name, email, and website in this browser for the next time I comment.
How to block advertising on android using dns, how to create multiple users in android 14, how to use opera free vpn on your android device.
@2023 - All Right Reserved.
How to find and change IP address on Debian
I nternet Protocol, popularly known as IP address , is the unique-based address allocated to all the devices connected to the internet. The computer network utilizes this address to communicate with other machines, network servers, and websites.
To better simplify this, let us take an example of a house address; the postman uses this address to deliver the mail to this house. The pizza delivery person uses the same house address to deliver pizza.
IP addresses use the same concept in that websites have their IP addresses; the websites also have a log of the IP addresses of the network from the location the web is accessed. When you interlink some databases of any server, you can access the database by having the IP address of its server, and that server again has the record of your IP address in its log sheet.
In this article, you will see how to find an IP address on Linux, specifically Debian , and how you can change the IP address simultaneously.
How do we find IP addresses on Debian?
There are ideally two methods that we can use to find out the IP address of our network on Debian. The first is by the Graphical User Interface (GUI), while the second is by executing simple commands on the terminal. You don’t need to worry about any of the methods as we will discuss both of them.
Method 1: Find IP address by terminal
To access your IP address via this method, then open up the terminal and type in the following command, and press “Enter” afterward to execute it:
In the output, you can see the IP address of our internet device, which our machine is connected to, is 192.168.62.138. Alternatively, we can still find this same IP address by running the following command in the terminal and pressing “Enter” afterward to execute.
Method 2: Find IP address by graphical user interface method
On the flip side, we can still find out the IP address via the GUI method. We will open up the settings window by going to “activities” and simply searching for settings and clicking on it to open.
Search for settings
After that, navigate to “Network,” located on the left side of the settings window.
Then click on the gear icon present in front of the option “Wired.”
Click on the gear button.
Upon clicking the gear icon, a prompt window will open up. This is where you can see your IP address with the title of IPv4 address as shown in the snapshot below:
Why should we have to change the IP address?
There are several reasons for one to change the IP address. Sometimes you might want to fix some internet-related issues. Furthermore, if you have any privacy concerns in online platforms, you can change your IP address to secure your network from the online audience. Similarly, if you want to conceal your machine from the other machines, you can also do that by changing your IP address.
How can I change my IP address on Debian?
We can carry out this task on Debian by running some simple commands in the terminal and from the Graphical user interface format.
Method 1: How to change IP address by terminal method
Debian has a network utility called Network Manager Text User Interface, known as “Nmtui,” a command-line tool used for network configuration on Gnu/Linux systems. When run, it prompts a graphical text interface that aids users in configuring network interfaces more effectively. Generally, numtui is utilized in configuring network-related settings. As such, run the following command in the terminal:
After that, a prompt will open, select the first option, “Edit a connection,” and press “OK.”
select Edit a connection
There and then, another prompt will open, Select “Edit.”
In the next window, select the “manual” option in the IPv4 CONFIGURATION
Then click on the “Show” option located in front of the IPv4 CONFIGURATION <Manual>
Click on Show
Go ahead and click on the Addresses, and you should be permitted to key in a new IP Address in this section.
Next, click on the address and add the required address.
As such, input your preferred IP address as shown below
Then scroll down the same window, and you will see two buttons, “Cancel and Ok,” select the “OK” button, and press “Enter.”
Click on OK
Select the “Back” button to close down this menu in the next window.
Another window will then come up. On this window, click on “Activate a connection.”
select Activate a connection
Here, we will restart the new settings we have enforced to take effect. To reboot the newly configured settings, select “Deactivate,” as shown in the screenshot below.
Then activate it again.
activate it again
After that, click on the “Back” button.
hit the back button again
As seen, we have changed the IP address, “126.96.36.199,” to “188.8.131.52.” Alternatively, we can use the graphical user interface to carry out the same changing IP address.
Method 2: How to change IP address by GUI method
To do this, open the settings by going to “activities” and using the search bar to look for the settings icon and click on it.
After that, navigate to the Network section as shown below
Then click on the settings icon in the Network section
After that, a prompt box will be opened, click on the IPv4, select Manual, type the desired IP address in the “address” box, key in the netmask and gateway addresses and click on the “APPLY” button to save the changes.
Finally, switch off the connection by clicking on the button and then switching “on” again to restart the settings.
off the on button
An IP address is a specific address of any user working on an internet environment. They can communicate to other network users, meaning it is end-to-end communication. This article has diversely discussed the meaning of an IP address, why one may opt to change an IP address and how you can change your PC’s IP address on Debian.
We, in detail, covered the two methods by command line method and the graphical user interface that we believe you are well of with now. Thanks for reading this guide, and keep following FOSS Linux for more on all Linux distros.
You may also like
A ultimate guide to setting up a vsftpd..., your complete guide to installing python on debian, fixing ‘repository does not have a release file’..., fix: ‘unable to locate package’ error in ubuntu..., how to install missing perl modules on debian, how to set up wireguard server on debian, leave a comment cancel reply.
Save my name, email, and website in this browser for the next time I comment.
ENHANCE YOUR LINUX EXPERIENCE.
FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.
Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.
MORE FROM US
- Ubuntu (302)
- Downloads (242)
- Learn Linux (216)
- Beginner's Guide (163)
- Terminal Tuts (151)
- Featured (126)
- Linux Mint (92)
- Fedora (86)
- Server (86)
- GDPR Policy
- Linux Careers
A PART OF VIBRANT LEAF MEDIA COMPANY.
“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.
- Beginner’s Guide
- Terminal Tuts
- Learn Linux