TheByteDungeon

TheByteDungeon is a personal tech blog where I document my thoughts, explore technical challenges, and reinforce my knowledge.

Home Posts Projects View on GitHub
28 December 2024

Ubuntu tips and tricks

There are always some command, shortkey or sequence of events I need to remeber once a blue moon and I almost never remeber them. So instead of googling or dumpster diving in the command history, I’ll just try to gather them here. That means this should be a somewhat of a living document..


System

Vim

Cheat sheet

Command mode (default)

y - copy line
p - paste line
dd - cut  line
d10 - delete 10 lines
u - undo

zsh and powerlevel

Guide

virtual machines

qcow2 is a “qemu” format which expand the size as needed. The VM can be shutdown with persistent storage.

sudo apt install qemu-kvm

qemu-system-x86_64 \
-enable-kvm                                                    \
-cpu host \
-m 4G                                                          \
-smp 2                                                         \
-hda /opt/virtualmachines/kali-linux-2024.4-qemu-amd64.qcow2   \
-netdev user,id=net0,net=192.168.100.0/24,dhcpstart=192.168.100.9,hostfwd=tcp::1337-:22  \
-device virtio-net-pci,netdev=net0                             \
-vga qxl                                                       \
-device AC97 # For sound if needed
tags: ubuntu - linux - vim - zsh - qemu