/home/Bernard
= root → home → Bernardpwd
– print working directory (current location)ls
– list contents of current directorycd <dir>
– change directory/home/Bernard
) and relative paths (../../Projects
).
– current directory (useful for commands needing an explicit “here” argument)..
– parent directory (cd ..
moves up one level)cd /
teleports to root when lostls -l
(first 10 chars)-rwxr-xr--
-
= regular file (d
would mean directory)rwx
r-x
r--
-w-
) or execute-only (--x
)chmod +x my_script.sh
– add execute for all classeschmod u=rw,go=r my_script.sh
– set exact rights+/-r
, +/-w
, +/-x
add/remove permissionschmod 755 my_script.sh
→ user rwx
(7), group r-x
(5), other r-x
(5)x
⇒ marker cannot run script ⇒ catastrophic.gnome-terminal
)lsblk
– block devices (disks, partitions)lspci
– PCI deviceslsusb
– USB devicesnohup
)gedit &
, then closing terminal)su
, sudo
)ls
, cp
, mv
, rm
, pwd
, cd
less
, cat
, grep
, head
, tail
, wc
ps
, kill
cut
, paste
man <command>
→ essential for mastering optionsprog < in.txt
(feed file into stdin)prog > out.txt
(stdout to file); >>
appends|
)ls | wc -l
→ count files by piping directory listing into line-countersystem()
, execvp()
, signals, pipes, low-level IO)chmod
) can compromise security or break marking pipelinesroot
ls -l
to decode permission strings by eyecd
grep
, cut
, paste
)ps
, kill
, &
, and nohup
to see parent/child relationshipsfork
, exec
, wait
to shell behaviour observed above