Posts tagged linux

Kill process listening on a specific port

Possible title underline, too short for the title. Treating it as ordinary text because it’s so short.

Read more ...


timesyncd

Update /etc/systemd/timesyncd.conf with:

Read more ...


Connect to the host from a docker container

Use the extra_hosts option in docker-compose:

Read more ...


ssh

Generate an ssh key:

Read more ...


Screen brightness

  • 19 July 2023
  • Tag: linux

Read more ...


VS Code and Copilot on Debian

Run the daemons and export the env variables for dbus and the keyring:

Read more ...


Merge PDFs

Merge a.pdf and b.pdf into c.pdf

Read more ...


printer

sudo apt-get install cups

Read more ...


xdg

  • 20 March 2023
  • Tag: linux

XDG (or Cross Desktop Group)

Read more ...


nmcli

Enable / disable the device:

Read more ...


Tap click / Natural Scrolling

Find the id of the input device:

Read more ...


Disk encryption

Create a partition using gparted.

Read more ...


Install Debian

Download the complete iso from: https://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-dvd/

Read more ...


Dual boot (UEFI)

update-grub automatically takes care of this by probing the EFI directory.

Read more ...


Debugging external monitor issues in Linux

  • 02 August 2022
  • Tag: linux

Sometimes when I connect the external monitor using usb-c, it gives the following error:

Read more ...


Tree structure without node_modules

Read more ...


Watch file

Here is a helper function watch-file which takes the arguments:

Read more ...


Convert images to a pdf

Use convert (from the package imagemagick):

Read more ...


Find open ports locally

Use netcat (from the package net-tools)

Read more ...


Get installed packages in Arch Linux

Get all the installed packages. Use the query -Q switch:

Read more ...


Upgrade Arch

Checking vulnerable pacakges:

Read more ...


Microphone

  • 31 January 2022
  • Tag: linux

Trying to get the microphone to work. Tried the following but in vain:

Read more ...


comm

  • 24 January 2022
  • Tag: linux

Compare two sorted files line by line:

Read more ...


Swap space

  • 11 January 2022
  • Tag: linux

Ubuntu 18.04

Read more ...


Express VPN

  • 04 January 2022
  • Tag: linux

Get package from https://www.expressvpn.com/setup#linux

Read more ...


Calibrate the touch input

  • 04 January 2022
  • Tag: linux

This is a problem when dual screen is being used.

Read more ...


lsof

  • 24 October 2021
  • Tag: linux

Find all ports

Read more ...


Disk space

  • 24 October 2021
  • Tag: linux

ncdu - NCurses Disk Usage.

Read more ...


Install Arch

x1 carbon, 7th gen

Read more ...


Virtual Machine

  • 30 December 2020
  • Tag: linux

I’ve tried virtual box before. I’ve heard that KVM is faster so I want to give it a try:

Read more ...


Track Memory Usage of a Process

  • 30 December 2020
  • Tag: linux

Image that you want to track the memory usage of dotnet, use the watch command with ps to get an overview of the memory usage:

Read more ...


Sound

  • 30 December 2020
  • Tag: linux

pavucontrol is a volume control for the PuseAudio sound server

Read more ...


Format a usb

  • 30 December 2020
  • Tag: linux

Ubuntu 19.04

Read more ...


Firejail

  • 30 December 2020
  • Tag: linux

Run linux apps in a sandbox:

Read more ...


Domain name resolution

Information is stored in the form of DNS records. There are different types of records and some of them required for our discussion are mentioned below:

Read more ...


Bind mount

  • 30 December 2020
  • Tag: linux

Using a bind mount might seem to accomplish what a symlink does but it happens at a lower level and changes the underlying topology of the filesystem (and hence it requires root privileges).

Read more ...


Create a gif from jpegs

Use convert (from package imagemagick):

Read more ...


Configuring External Monitors

  • 30 November 2019
  • Tag: linux

xrandr is a popular lib. For a GUI version, use arandr which lets you create a screen layout and save it as a bash script.

Read more ...


Hibernate using a swap partition

  • 17 October 2019
  • Tag: linux

Ubuntu 19.04

Read more ...


Hibernate using a swap file

  • 17 October 2019
  • Tag: linux

Ubuntu 18.04

Read more ...


Use the swap partition instead of the swap file

  • 16 October 2019
  • Tag: linux

To persist these changes across reboots, update the fstab file and edit /swapfile to /dev/nvme0n1p3

Read more ...


Upgrade Ubuntu Distribution

  • 16 October 2019
  • Tag: linux

Check the current release:

Read more ...


Resize the mounted parition

  • 16 October 2019
  • Tag: linux

Start the machine using a ‘recovery’ usb. This makes it possible to work with the partition as it is not mounted.

Read more ...


DPKG

  • 16 October 2019
  • Tag: linux

Debian’s package manager

Read more ...


Boot

OS : Ubuntu 18.04

Read more ...


Increase swap size

  • 13 July 2019
  • Tag: linux

GUI tool that I used on Ubuntu: gparted

Read more ...


What is the RAM size?

Read more ...


Hibernate without Secure boot?

Apparently, this can’t be done with kernel

Read more ...


Default editor for sudo

Read more ...


Open gnome settings on Xmonad

On xmonad

Read more ...


Displaylink on Ubuntu 18.04

I want to use additional monitors and I got a ThinkPad Hybrid USB-C with USB-A Dock It looks like this:

Read more ...


Connect to a windows machine

Read more ...