Ubuntu

shortcuts

  • Shift + Ctrl + PrtSc – Copy the screenshot of a selected region to the clipboard.

loop file conversion

# convert xlsx to csv
for i   in *.xlsx; do  libreoffice --headless --convert-to csv "$i" ; done

root organizations

/etc/systemd/*   # https://systemd.io/  boot, service mgmt,  

stat # inode

networking

netstat -tunlp
ss -tunlp
nmcli
wget
curl
ping
ifconfig

### difficulties? connecting to unsecured wifi networks with login pages (ie airport, coffeeshop)
sudo service network-manager restart
ip route
systemd-resolve --status
iwconfig # check wifi speed

/etc/resolv.conf # check the dns of a page if your phone connects to and then add it to you  file ahead of 8.8.8.8 or your normal dns

permissions

chown  # octal {rwx rwx rwx} represents permissions for  { owner group other } 

#### credit https://linuxize.com/post/chmod-command-in-linux/
-rw-r--r-- 12 linuxize users 12.0K Apr  8 20:51 filename.txt
|[-][-][-]-   [------] [---]
| |  |  | |      |       |
| |  |  | |      |       +-----------> 7. Group
| |  |  | |      +-------------------> 6. Owner
| |  |  | +--------------------------> 5. Alternate Access Method
| |  |  +----------------------------> 4. Others Permissions
| |  +-------------------------------> 3. Group Permissions
| +----------------------------------> 2. Owner Permissions
+------------------------------------> 1. File Type
####

chmod
chgrp

groups ## see all groups
less /etc/passwd #or# getent passwd  #### see all users
groups USER ### groups for USER

packages

type PACKAGE   #shows install path
apt-cache policy PACKAGE
apt-get    #
ppa-purge
aptitude
snap list

other

fdisk
df
ds
ps
conky
sudo blkid

hibernation issues

systemctl hibernate
cd /sys/power
man busctl

swapon --show
sudo swapon /dev/sda2  # example of adding partition
sudo nano/etc/fstab
swapoff

cat /proc/swaps
cat /etc/initramfs-tools/conf.d/resume
cat /etc/fstab

lsblk
sudo blkid
#other
dd # Copy a file, converting and formatting according to the operands.
fdisk -l # Display or manipulate a disk partition table.

user config

in home folder

  • .bashrc
  • .bashprofile
  • .zsh
  • .profile
  • .config/*

cli tools

  • ranger --- explorer / finder in
  • ncdu --- shows size of all files sorted navigate with arrow keys