Tag: ubuntu

  • Network devices not found after Ubuntu upgrade from 20.04 LTS to 22.04 LTS

    I had recently upgraded my laptop from Ubuntu 20.04 from 22.04. Once restarted after the upgrade, my laptop just wouldn’t connect to any network (LAN/Wifi/USB tethering)

    I ran this command to see the network devices:

    sudo lshw -c network

    Which gave a very similar result as this:

    *-network UNCLAIMED       
       description: Ethernet controller
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       version: 03
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list
       configuration: latency=0
       resources: ioport:d800(size=256) memory:f8fff000-f8ffffff memory:f8ff8000-f8ffbfff memory:f9ee0000-f9efffff
    
    
     *-network UNCLAIMED
       description: Network controller
       product: RTL8812AE 802.11ac PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: ioport:c800(size=256) memory:f9dfc000-f9dfffff

    Solution

    After some research these were the steps which I followed to get the network devices and the network connectivity back

    In terminal, run

    uname -r
    6.5.0-25-generic

    Note the output, for me it was “6.5.0-25-generic”

    From another computer, download linux-modules-extra-6.5.0-25-generic.deb from here.

    Please note that depending on the kernel version you are running (as indicated by the uname output,) your exact .deb file will be different.

    Copy the downloaded .deb file into the network-broken laptop using a pen-drive.

    Now in the network-broken laptop, cd to the location of the .deb file.

    Run

    sudo dpkg -i linux-modules-extra-6.5.0-25-generic_6.5.0-25.25~22.04.1_amd64.deb

    Restart the laptop.

    The network devices and network connectivity was restored.

  • Ubuntu Fix: Newly added volume shows size of only few 100 MBs

    Run this command, (assuming the format and mounting was done correctly).

    sudo resize2fs /dev/{device}

    Kj

      

  • Runbook: Upgrade NodeJS on Ubuntu

    Here are the steps you can follow to upgrade NodeJS on an Ubuntu system.

    sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* ~/.npm
    sudo rm -rf /usr/local/lib/node*
    sudo rm -rf /usr/local/bin/node*
    sudo rm -rf /usr/local/include/node*
    
    sudo apt-get purge nodejs npm
    sudo apt autoremove
    
    Download the latest installable archive for your OS from https://nodejs.org/en/download/
    
    tar -xf your-archiveFile
    sudo mv extracted-archiveFolder-name/bin/* /usr/local/bin/
    sudo mv extracted-archiveFolder-name/lib/node_modules/ /usr/local/lib/
    node -v
    #should display the latest version of node
  • Set timezone to India in Ubuntu

    Rather than a how to, written as a must do for our servers.

    Probably the most important command for 60% of developers out there 🙂

    sudo timedatectl set-timezone Asia/Kolkata
  • Flush DNS cache in Ubuntu 20.xx and above

    On bash, run –

    sudo systemd-resolve --flush-caches

    Should be done.

  • host-name getting reset after a reboot

    Problem:

    The newly set hostname reverts back to older one after reboot

    Reason :

    Hostname is reset by cloud-init

    Solution :

    Inactivate cloud-init.

    On terminal, key in –

    [bash] hostnamectl set-hostname YourNewHostName sudo touch /etc/cloud/cloud-init.disabled sudo reboot [/bash]

  • Fix : Touchpad not working in Ubuntu

    Could fix the touch-pad of my Ubuntu system which went off due to an unknown reason with these commands  –

    1. On terminal run –
      • sudo rmmod i2c_hid
      • sudo modprobe i2c_hid
    2. Restart the system.