S
S
Sergey2019-11-12 19:03:17
linux
Sergey, 2019-11-12 19:03:17

How to turn on/off internet via .sh file in linux ubuntu?

Good afternoon, I need to change the IP at the end of the script (.sh file), as I understand it, it will be enough for me to turn on / off the Internet (the provider has a dynamic IP, the computer is connected directly via cable).
But how to do that? How to disable / enable the Internet connection through a .sh file, maybe someone will throw a link or a code, I'm very weak in LINUX (

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2019-11-12
@1Sergey1

more or less like this

sudo ifconfig eth0 up

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question