Jump to content

How to manually setup networking in Linux?

I use ethernet and want to connect to the internet. I always use Network Manager and it just works but I am looking to do it manually. Literally all the sources have some different way to do it. I am not a networking guy at all, so what do I need to setup?

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

What do you think you're looking to achieve by doing it "manually"?

Link to comment
Share on other sites

Link to post
Share on other sites

If you haven't installed Linux yet, connect the cable to the router prior to  installation it will ask a couple of questions and set it up for you. That's the easiest method. And since you haven't done much to your installation, a re-installation in the quickest method without the time doing it after installation requires.

 

And why would you want to do it "manually", when the OS is designed to do it for you? Or are you actually connecting to actual network instead of simply connecting to your ISP? The two are not the same thing.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Dpends on your distro. Ubuntu based distros usually use netplan. Its /etc/network for debian based distros.

mY sYsTeM iS Not pErfoRmInG aS gOOd As I sAW oN yOuTuBe. WhA t IS a GoOd FaN CuRVe??!!? wHat aRe tEh GoOd OvERclok SeTTinGS FoR My CaRd??  HoW CaN I foRcE my GpU to uSe 1o0%? BuT WiLL i HaVE Bo0tllEnEcKs? RyZEN dOeS NoT peRfORm BetTer wItH HiGhER sPEED RaM!!dId i WiN teH SiLiCON LotTerrYyOu ShoUlD dEsHrOuD uR GPUmy SYstEm iS UNDerPerforMiNg iN WarzONEcan mY Pc Run WiNdOwS 11 ?woUld BaKInG MY GRaPHics card fIX it? MultimETeR TeSTiNG!! aMd'S GpU DrIvErS aRe as goOD aS NviDia's YOU SHoUlD oVERCloCk yOUR ramS To 5000C18

Link to comment
Share on other sites

Link to post
Share on other sites

Networkmanager is kinda like virtual.

network like proxmox, just create a connection give it a name and if you don't select adapter then it just grabs any adapter and connects with it if you have auto connect enabled.

 

Modify ipv4 or ipv6 and select manual.

Then add ip adress to any of those then you have manually set the network.

I'm jank tinkerer if it works then it works.

Regardless of compatibility 🐧🖖

Link to comment
Share on other sites

Link to post
Share on other sites

@whispous @Thomas4 @Levent @BoomerDutch

 

I am not new to Linux. I am using Arch (without DE). I am trying to not depend on an external program and instead setting up the network manually through vanilla Linux means.

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Gat Pelsinger said:

@whispous @Thomas4 @Levent @BoomerDutch

 

I am not new to Linux

Then you should be able to read man pages and documentation to understand it and how to use it.  Or at least get started and ask specific questions about the process should you run into road blocks.

This certainly is verging into the territory of "if you need to ask basic questions, you probably shouldn't be doing it at this point".

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Gat Pelsinger said:

@whispous @Thomas4 @Levent @BoomerDutch

 

I am not new to Linux. I am using Arch (without DE). I am trying to not depend on an external program and instead setting up the network manually through vanilla Linux means.

Oh, ive tried like 30 times always failed.

Because i haven't fully grasp everything yet because you'll need correct configuration in order to work.

 

Like putting pin in haystack.

 

I'd say good luck.

🛌

I'm jank tinkerer if it works then it works.

Regardless of compatibility 🐧🖖

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Gat Pelsinger said:

@whispous @Thomas4 @Levent @BoomerDutch

 

I am not new to Linux. I am using Arch (without DE). I am trying to not depend on an external program and instead setting up the network manually through vanilla Linux means.

https://linux.die.net/man/8/ip

 

sure you arent!

mY sYsTeM iS Not pErfoRmInG aS gOOd As I sAW oN yOuTuBe. WhA t IS a GoOd FaN CuRVe??!!? wHat aRe tEh GoOd OvERclok SeTTinGS FoR My CaRd??  HoW CaN I foRcE my GpU to uSe 1o0%? BuT WiLL i HaVE Bo0tllEnEcKs? RyZEN dOeS NoT peRfORm BetTer wItH HiGhER sPEED RaM!!dId i WiN teH SiLiCON LotTerrYyOu ShoUlD dEsHrOuD uR GPUmy SYstEm iS UNDerPerforMiNg iN WarzONEcan mY Pc Run WiNdOwS 11 ?woUld BaKInG MY GRaPHics card fIX it? MultimETeR TeSTiNG!! aMd'S GpU DrIvErS aRe as goOD aS NviDia's YOU SHoUlD oVERCloCk yOUR ramS To 5000C18

Link to comment
Share on other sites

Link to post
Share on other sites

Archwiki's install guide walks you through it.

 

https://wiki.archlinux.org/title/installation_guide#Connect_to_the_internet

 

But yeah,

  

50 minutes ago, Gat Pelsinger said:

Literally all the sources have some different way to do it.

That's because there are tons of different stacks available.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Kilrah said:

Archwiki's install guide walks you through it.

That is only for the live environment.

 

One question though, they have systemd-networkd and systemd-resolved services listed. They are supposed to give me DHCP and that's it? I did enable those 2 services in my Arch install but I still couldn't ping. I probably didn't take the effort to restart though.

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Gat Pelsinger said:

That is only for the live environment.

Same base afterwards, with more options though.

https://wiki.archlinux.org/title/Network_configuration

 

4 minutes ago, Gat Pelsinger said:

They are supposed to give me DHCP and that's it?

One DHCP, one DNS.

Quote
F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

@Kilrah

 

I first had to set my ethernet link up for it to even work. I then enabled systemd-networkd and systemd-resolved and it worked and I could ping successfully. But I want to do it even more manually. The AI overlords suggested me to first assign a static IP address, optionally assign a default gateway, and then specify a DNS in /etc/resolv.conf.

 

So I did "ip addr add 192.168.1.10/24 dev <name>" The /24 would mean the subnet mask (CIDR notation) of 255.255.255.0, which I hope is correct. I know my LAN is set on 192.168.1.X, because my router can be accessed at 192.168.1.1. After that I did NOT set up a default gateway as it is optional but I will try this time. I then in /etc/resolv.conf, wrote "nameserver 8.8.8.8" which should be the Google DNS servers. I am writing this because of course it didn't work and I couldn't ping. Are the settings applied directly after writing to resolv.conf or do I have to start up something (both the 2 services are off)? Is the default gateway necessary?

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, Gat Pelsinger said:

Is the default gateway necessary?

If you want to reach outside of your own network, yes.

 

It's optional to "be on a network", it's not if you want to "reach the internet".

When you go low level you're going to get "technically correct" instructions. Reaching the internet is not necessary to network computers.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

networkmanager has a tui called nmtui

 

 

Can Anybody Link A Virtual Machine while I go download some RAM?

 

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Gat Pelsinger said:

I am trying to not depend on an external program and instead setting up the network manually through vanilla Linux means.

3 hours ago, Gat Pelsinger said:

So I did "ip addr add 192.168.1.10/24 dev <name>"

I then in /etc/resolv.conf, wrote "nameserver 8.8.8.8"

You are using iproute2 so you still depend on a "external program", granted it's part of base, but so is systemd-networkd. The only difference is iproute2 is developed alongside the kernel and on its own it isn't persistent. Also be aware that without a dns server you don't have DNSSEC support or caching, systemd-resolved is also part of the base package.

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, Gat Pelsinger said:

So I did "ip addr add 192.168.1.10/24 dev <name>" The /24 would mean the subnet mask (CIDR notation) of 255.255.255.0, which I hope is correct. I know my LAN is set on 192.168.1.X, because my router can be accessed at 192.168.1.1. After that I did NOT set up a default gateway as it is optional but I will try this time. I then in /etc/resolv.conf, wrote "nameserver 8.8.8.8" which should be the Google DNS servers.

You need to be reading the networkd docs; as with all systemd docs they are pretty shit and don't always work as advertised, but if you are just setting an ip and gw you'll be fine.

If you don't want networkd running, just script your ip commands and create a .service that oneshots that script at startup, it's a valid case if you want a network to be configured before it's got carrier. If nothing is attempting to "manage your network" resolv.conf is a static file that you can just leave your choice of dns server in.

If you later want wifi to work you can use something like wpa_supplicant, wrap it in a sudo script and have a "wifi on/off" button on your desktop - just because you use systemd doesn't mean you have to use it's daemons.

Link to comment
Share on other sites

Link to post
Share on other sites

18 hours ago, Gat Pelsinger said:

I use ethernet and want to connect to the internet. I always use Network Manager and it just works but I am looking to do it manually. Literally all the sources have some different way to do it. I am not a networking guy at all, so what do I need to setup?

So what you mean is you want to use dhcpcd or systemd-networkd

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×