This is a handy tool if ever find you need a Lan and only have wifi and a laptop/Desktop with wifi
and work on most distros of linux
step 1. Connect to the wifi
step 2. Open Network Manager (Gnome) Click edit connections,
step 3. Click add, Ethernet should be viewed then create it and name it Wifi Tether
step 4. on the general tab uncheck automatically connect to this network when it is available
step 5. on the IPv4 Settings Tab, change Automatic (DHCP) to Shared to other computers
step 6.save
to use it
connect Ethernet cable from other computer or router click on wifi tether done!
https://help.ubuntu.com/community/Internet/ConnectionSharing
yes you can do it cli