Define a Static IP Address for a Device or Machine in a Linux Environment

In this small article we will briefly show how to define a static IP address for a device or machine environment like a Raspberry Pi device or computer.

Having the device or machine fully configured and ready to go, open a terminal and execute the following to open the configuration document for DHCP the options:

sudo nano /etc/dhcpcd.conf

Before proceeding, we need to consider some valid points like:

  • ip_address the chosen static IP and type / subnet mask.
  • routers the default router/access point IP in the same type.
  • domain_name_servers the domain IP’s.

At the final of the document add the following block of data to define the static IP for the respective device or machine to the wlan0 interface:

# Static IP for WIFI
interface wlan0
static ip_address=192.168.1.10/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 8.8.8.8

After everything completed, reboot safely and check the respective IP for the wlan0 interface by executing the ip addr command on a terminal.

Hope you liked this small article, best regards, Ricardo Costa (Richards).

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How ng-content and selector can help you ?

Knowledge Management Software Overview 2021

Operating System — Scheduling

The “inherited” callback

Large File Processing using Apache Camel with AWS S3

Flutter, how to create a Todo app using firestore and firebase authentication with GetX [Part 1] .

Advice for the Aspiring Accessibility Tester / Manager

Woman wearing a denim jacket with long wavy dirty blonde hair reaching out to touch a futuristic-looking computer screen

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
R1CH4RD5

R1CH4RD5

More from Medium

3 Customer Support Strategies That Can Boost your Brand’s CX

How to buy SafeMoon on Binance: DotBig Review

First Spring Semester Pleasure Reading Session!

How to Seon: A Case Study with ChocoPebbles