Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Command for turning on/off network in Centos 8

-First check your ens number


$ ifconfig


-To turn on network


$ sudo nmcli con up ens33


-Above '33' is my ens number

-To turn of network


$ sudo nmcli con down ens33


-To check if you have network connection


$ ping 8.8.8.8


-This goes on forever, press Ctrl+c to exit.
 
PREVIOUS NEXT
Tagged: #Command #turning #network #Centos
ADD COMMENT
Topic
Name
3+4 =