Skip to content

Commit 1c08b2d

Browse files
committed
notes
1 parent 2f0fb03 commit 1c08b2d

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

notes/cli/linux.scrbl

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,9 @@
10621062
# last tty (tty switching is also possible by ~M-'some-f-key'>~)
10631063

10641064
# mount windows shares under linux
1065+
# -o, --options <list> comma-separated list of mount options
10651066
sudo mount.cifs //WINDOWS_MACHINE/path/to/dir path/to/dir \
1066-
-o user=WINDOWS_USERNAME
1067+
--options user=WINDOWS_USERNAME
10671068

10681069
# resize disk of a virtual machine
10691070
set file /path/to/some-name.iso.qcow2
@@ -1095,13 +1096,17 @@
10951096
df -h
10961097

10971098
# :virtualbox mount shared folder
1098-
sudo mount -t vboxsf share /home/username/share/
1099+
# -t, --types <list> limit the set of filesystem types
1100+
sudo mount --types vboxsf share /home/username/share/
10991101

11001102
# readonly to readwrite
1101-
sudo mount -o remount,rw /partition/identifier /mount/point
1103+
# -o, --options <list> comma-separated list of mount options
1104+
sudo mount --options remount,rw /partition/identifier /mount/point
11021105

1103-
# mounted filesystems - table layout; -t --table
1104-
mount | column -t
1106+
# mounted filesystems - table layout
1107+
# -t, --table create a table
1108+
# -s, --separator <string> possible table delimiters
1109+
mount | column --table
11051110

11061111
# filter out some columns, remove table headers, etc. with `column`:
11071112
guix package --list-available="emacs-(ace-jump-helm-line|yasnippet).*" \
@@ -1113,7 +1118,9 @@
11131118
| awk '{print "("$1, "\""$2"\"", $4")"}'
11141119

11151120
# align csv file
1116-
cat data.csv | column -t -s ';'
1121+
# -t, --table create a table
1122+
# -s, --separator <string> possible table delimiters
1123+
cat data.csv | column --table --separator ';'
11171124

11181125
# :xml command line XML tool (formating)
11191126
xmllint
@@ -1334,6 +1341,11 @@
13341341
# network - retcode==1 - online; retcode!=1 offline
13351342
nm-online --exit; echo "retcode: $?"
13361343

1344+
# find out / obtain the names of wired (Ethernet) / WiFi network interfaces
1345+
# Ethernet interfaces have a type of 1
1346+
rg -l '1' /sys/class/net/*/type | cut -d'/' -f5 # wired (Ethernet)
1347+
iw dev | awk '$1=="Interface"{print $2}' # WiFi
1348+
13371349
# wifi net nmcli - command-line tool for controlling NetworkManager
13381350
nm-applet
13391351
man nmcli-examples
@@ -1470,7 +1482,9 @@
14701482

14711483
# super fast ram disk
14721484
sudo mkdir -p /mnt/ram
1473-
sudo mount -t tmpfs /mnt/ram -o size=8192M
1485+
# -t, --types <list> limit the set of filesystem types
1486+
# -o, --options <list> comma-separated list of mount options
1487+
sudo mount --types tmpfs /mnt/ram --options size=8192M
14741488

14751489
# mount / umount (usb) disk without 'root' as the mount command.
14761490
udiskie --verbose # user-level daemon for auto-mounting

0 commit comments

Comments
 (0)