Saturday, 21 April 2018

connect ubuntu to wifi from command line

so i have a server install of a beta release of bionic beaver - ubuntu 18.04 - I want to connect this to wifi as I'm not near my cobbler server and cant connect to it via ethernet at the moment.

If we've connected before we can view previous connections:

nmcli c

- havent had any previous connections so no luck there.

to see wifi hotspots near me:

root@bionic-beaver-x8664:~# nmcli d wifi list
IN-USE  SSID                  MODE   CHAN  RATE        SIGNAL  BARS              SECURITY
abramshumps                       Infra  13    270 Mbit/s              100     ▂▄▆█        WPA2
abramshumps_5G                Infra  36    270 Mbit/s                69      ▂▄▆_         WPA1 WPA2
abramshumps                       Infra  13    270 Mbit/s                64      ▂▄▆_         WPA1 WPA2

cool - so wifi working out of the box this time - not going to have to go through pain of building drivers for my laptop (Dell Latitiude 7280)

so next lets see my wifi device:

root@bionic-beaver-x8664:~# ip link show
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s31f6: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether a4:4c:c8:21:7c:44 brd ff:ff:ff:ff:ff:ff
3: wlp2s0: mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether cc:2f:71:73:a3:3e brd ff:ff:ff:ff:ff:ff

we can try and connect to it now:

root@bionic-beaver-x8664:~# nmcli d wifi connect abramshumps password supersecretpw
Device 'wlp2s0' successfully activated with 'ead1b11c-3d70-4ba8-9ca9-48389235c7db'.

now lets test connectivity to internet:

root@bionic-beaver-x8664:~# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=60 time=13.2 ms
64 bytes from icmp_seq=2 ttl=60 time=13.3 ms
--- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 13.292/13.344/13.397/0.126 ms

yay - I can now add ubuntu-desktop and other goodies I want :-)

1 comment:

    Have you ever wondered if it's possible to hack things the way hackers do it in the movies.πŸ€”πŸ€”

    Yeah its possible!!!😁😁😁

    Hacking can easily be done by planting a computer virus or spyware(depending on what the hacker intend to do) in the targeted device.🀐🀐

    We at THE HACK GEEKS give you the best hacking service there ever is.πŸ‘ŒπŸ‘Œ
    We understand the Issues of scammers all over the internet and that's why we give you a solid prove of our services.

    We have got the top hackers in that are always ready to hack for you anytime ,anywhere, any device, organisation, federal agencies, university, college you just think of it.
    We can help:
    *To Hack, Clone or Track a Phone?πŸ“±πŸ“²
    *To Sniff, Erase or Change a file in a Company, Organisation or in a Federal agency?πŸ“–πŸ“ƒ
    Eg: Changing of grades in a university.
    Changing of identity.
    Deleting of files such as criminal records and evidence.
    Changing of files and evidence in federal facilities.
    Stealing of files and document from companies and organizations.
    *To retrieve lost BitCoinπŸ’°πŸ’°
    *Mining of BitCoinπŸ’°πŸ’°
    *To hack an Email or any Social Media account?πŸ’ž
    *To Transfer funds without been detected?πŸ’΄πŸ’΅πŸ’·
    *To increase your credit score?πŸ”πŸ”
    *To Hack Credit/Debit card?πŸ’³πŸ’³

    All these are what we can do for you.

    We are descrete and won't expose our service to you to anyone.
    We look forward to hacking for you.


bash best practices

Bash best practices A few hints on bash best practice: * use #!/usr/bin/env bash .. this is more portable but you cant rely on a spe...