How to setup Wi-Fi profile and static IP on Arch Linux

Static IP address makes it simpler for computers to find the server from anywhere in the globe because it's fixed, unlike dynamic IP. We shall use netctl utility that is provided in the base package in the arch to setup Wi-Fi profile and static IP.

This tutorial will walk you through the settings of  Wi-Fi profile and static IP on wireless as well as wired networks on Arch Linux using netctl.

Introduction

netctl is a utility that is provided in the base package in the arch and is responsible for managing the network connections and different modes of operations. It should be pre-installed.

Setting Up Profile with netctl

Installing netctl
Installing netctl

You can also install netctl by entering;
$ pacman -S netctl

You can see the details of netctl by entering $ netctl or by $ netctl --help;

netctl command details
netctl command details

install dependencies
Install dependencies

Now you need to install a few dependencies that are necessary for running netctl. Install them by entering
$ pacman -S dhclient wpa_supplicantdialog

Now your netctl utility is ready to be used. Configure your profile by entering the following command;

$ sudo nano /etc/netctl/ens33

Edit Profile
Edit Profile

Replace the ens33 with the name of your machine’s interface. You can find that by entering the following command;

$ ip link show

Similarly, replace the Wi-Fi Name with the name of Wi-Fi you are connecting to and My WiFi Password with its password.

If you want to set up your Wi-Fi profile using GUI, enter the following command;

$ sudo wifi-menu -o

A dialog box will pop up, showing you all the available Wi-Fi networks. You can choose the desired Network and authenticate to it using the Wi-Fi password/key.

Now your wifi profile has successfully been setup. Use the netctl commands to start, stop, enable, disable, and restore the profile.

Setting Up Static IP on Wi-Fi Profile

There may be some cases when the Wi-Fi doesn’t support the DHCP-client or DHCP is by default turned off. In that case, you can assign a static IP to your wi-fi profile. Remember to assign an IP in a valid subnet currently being used by the wi-fi. Giving a random static IP may not work.

Enter the following command;

$ nano /etc/netctl/name_of_static_profile

Editing Static Profile
Editing Static Profile

Remember to replace the Interface, Security, ESSID, Key, IP & Gateway details with details of your wi-fi connection. You can use default DNS provided to you, or you may use any Public DNS like Google, OpenDNS, Cloudflare, etc.

Setting Up Static IP on Wired Profile

It’s decidedly less likely that Wi-Fi uses a static IP scheme. However, static IPs are very common in Ethernet/Wired connections. Mega corporates often tend to disable DHCP to stop intruders from successful communications even if they have managed to connect to the network.

To assign a static IP to the wired profile, enter the following command;

$ sudo nano /etc/netctl/Name_of_wired_profile

Editing Static Profile
Editing Static Profile

After that, you have to configure the profile as per your needs using different options provided by netctl. You have to enable and start a profile. Remember to use sudo while setting up a profile else the changes may not affect.

Conclusion

netctl is a powerful utility that lets us play with our network profiles. All the netctl profiles are stored in the /etc/netctl/ directory. Similarly, it also provides us the capability to store our Wi-Fi keys/password in 256-bit pre-shared key.

Zohaib Yousaf
My name is Zohaib Yousaf. I'm an Ethical Hacker & a Pen Tester. Python scripting and Bash automation is my hobby. My research work is in Anonymity. I have co-worked in development of few anonymity solutions which implemented different Cryptographic Algorithms.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,521FansLike
366FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

How to setup FTP Server on CentOS

You are allowed to use any one of the FTP servers as you like. However, in this tutorial, we will be installing and using vsftpd, short for Very Secure FTP Daemon. It is a fast, stable, and secure FTP server that will help you transfer files to and from a remote system in a jiffy.

CentOS Vs. Ubuntu Server : Everything You Need to Know

Choosing the perfect Linux distribution to set up your server can be confusing since Linux provides a limitless number of options. The main reason behind these many distributions is because Linux is an opensource platform. Anybody with the required skills can contribute to the development or build and release their distribution. Currently, there are more than 600 Linux Desktop and Server distributions in the market.

Top 10 Reasons to use Xfce as your Desktop Environment

There are many choices for desktop environments for Linux based operating systems. Mainly, you can install any DE of your choice on most of the Linux based distributions, even if they are not offered as a package officially. In our recent articles, we discussed the best of KDE and Cinnamon. In this article, we wish to present to you the top reasons why you should consider Xfce as your desktop environment.

The 10 Best Linux Network Monitoring Tools

Having total control over your network is essential to prevent programs from overusing your network resources and slowing down the overall performance. This is why you should install a network monitoring tool on your system, giving you a visual overview of everything that's happening on your network. Networking Tools are like swiss-knife for the system administrators for troubleshooting system issues.

How to install CouchPotato on Ubuntu

Downloading movies and copying them over to your home server can get frustrating, especially if you are doing it daily! What if you have an option to download videos automatically, quickly, and above all with excellent quality. CouchPotato allows you to download movies easily once they are available and released automatically.

Top 20 Rsync Examples in Linux

The Rsync (remote sync) command is a Linux/Unix utility used to synchronize and copy files and directories either locally or remotely. Most Linux geeks use Rsync to mirror, backup or migrate data across folders, across disks and networks. One notable feature with the Rsync command is that it uses the "delta transfer algorithm."

MUST READ

Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

Beaker Browser: A P2P web browser you must try

I think we can all agree on the fact that the web browser is an integral part of our Linux systems, or any computer system, for that matter. We have had several fulfilling options for browsing the web, like Firefox, Brave, Vivaldi, Tor, etc. and they have worked pretty well, but also pretty much in the same way, except for Tor, which is much better for anonymity.

How to clone hard disk on Linux using Clonezilla

Disk cloning refers to the process of copying data from one disk to another, thus creating a one-to-one copy of the drive. Technically, this process is possible using the copy-and-paste method.

6 Best Linux Distros for Laptops

Whether buying a Linux pre-installed laptop or selecting a Linux distro for your existing laptop, there are many things to consider. Let's take you through some of the best Linux distros that are optimized for Laptops in this 2019 edition of the article. Read on.

3 Best Ways to Uninstall Software on Ubuntu

Uninstallation of programs can be done by graphical way using the Ubuntu Software Center, and the Synaptic Package manager. Command-line way of doing it is also possible using apt-get and aptitude commands. We shall discuss each one of them in detail.