[{"data":1,"prerenderedAt":541},["ShallowReactive",2],{"mdc--sfkorq-key":3,"mdc--h2arbl-key":45,"mdc--d3tyrg-key":83,"mdc-q5dkb3-key":110,"mdc--8aputp-key":265,"mdc-2thti8-key":277,"mdc--vmidf8-key":379,"mdc-l8eoxj-key":392,"mdc-cy06wb-key":419,"mdc-or26qf-key":526},{"data":4,"body":5},{},{"type":6,"children":7},"root",[8,40],{"type":9,"tag":10,"props":11,"children":12},"element","p",{},[13,16,23,25,31,33,38],{"type":14,"value":15},"text","Linux has no drive letters. There is no ",{"type":9,"tag":17,"props":18,"children":20},"code",{"className":19},[],[21],{"type":14,"value":22},"C:",{"type":14,"value":24},". Everything — every disk, every USB stick, every device, every file — hangs off a single tree that starts at ",{"type":9,"tag":17,"props":26,"children":28},{"className":27},[],[29],{"type":14,"value":30},"/",{"type":14,"value":32},", called the ",{"type":9,"tag":34,"props":35,"children":36},"strong",{},[37],{"type":14,"value":6},{"type":14,"value":39},".",{"type":9,"tag":10,"props":41,"children":42},{},[43],{"type":14,"value":44},"Getting comfortable at the command line is mostly getting comfortable moving around this tree without looking at it.",{"data":46,"body":47},{},{"type":6,"children":48},[49,56],{"type":9,"tag":50,"props":51,"children":53},"h2",{"id":52},"three-commands-do-almost-everything",[54],{"type":14,"value":55},"Three commands do almost everything",{"type":9,"tag":10,"props":57,"children":58},{},[59,65,67,73,75,81],{"type":9,"tag":17,"props":60,"children":62},{"className":61},[],[63],{"type":14,"value":64},"pwd",{"type":14,"value":66}," tells you where you are. ",{"type":9,"tag":17,"props":68,"children":70},{"className":69},[],[71],{"type":14,"value":72},"ls",{"type":14,"value":74}," shows you what's here. ",{"type":9,"tag":17,"props":76,"children":78},{"className":77},[],[79],{"type":14,"value":80},"cd",{"type":14,"value":82}," moves you somewhere else. That's the loop, and you'll run it thousands of times.",{"data":84,"body":85},{},{"type":6,"children":86},[87,92],{"type":9,"tag":88,"props":89,"children":91},"terminal-teaser",{":lines":90},"[{\"cmd\":\"pwd\",\"out\":\"/home/you\"},{\"cmd\":\"ls\",\"out\":\"Desktop  Documents  Downloads  notes.txt  projects\"},{\"cmd\":\"cd projects\"},{\"cmd\":\"pwd\",\"out\":\"/home/you/projects\"}]",[],{"type":9,"tag":10,"props":93,"children":94},{},[95,97,102,104,109],{"type":14,"value":96},"Notice the third command printed nothing. That's not a failure — it's the Unix convention that ",{"type":9,"tag":34,"props":98,"children":99},{},[100],{"type":14,"value":101},"silence means success",{"type":14,"value":103},". Commands that worked usually say nothing at all. If you wanted reassurance, you'd have to ask for it with ",{"type":9,"tag":17,"props":105,"children":107},{"className":106},[],[108],{"type":14,"value":64},{"type":14,"value":39},{"data":111,"body":112},{},{"type":6,"children":113},[114,120,139,151,169,178,183,188],{"type":9,"tag":50,"props":115,"children":117},{"id":116},"absolute-and-relative-paths",[118],{"type":14,"value":119},"Absolute and relative paths",{"type":9,"tag":10,"props":121,"children":122},{},[123,125,130,132,137],{"type":14,"value":124},"A path starting with ",{"type":9,"tag":17,"props":126,"children":128},{"className":127},[],[129],{"type":14,"value":30},{"type":14,"value":131}," is ",{"type":9,"tag":34,"props":133,"children":134},{},[135],{"type":14,"value":136},"absolute",{"type":14,"value":138}," — it's measured from the root of the tree, so it means the same thing no matter where you are:",{"type":9,"tag":140,"props":141,"children":145},"pre",{"className":142,"code":144,"language":14},[143],"language-text","cd /var/log\n",[146],{"type":9,"tag":17,"props":147,"children":149},{"__ignoreMap":148},"",[150],{"type":14,"value":144},{"type":9,"tag":10,"props":152,"children":153},{},[154,156,161,162,167],{"type":14,"value":155},"A path not starting with ",{"type":9,"tag":17,"props":157,"children":159},{"className":158},[],[160],{"type":14,"value":30},{"type":14,"value":131},{"type":9,"tag":34,"props":163,"children":164},{},[165],{"type":14,"value":166},"relative",{"type":14,"value":168}," — it's measured from wherever you currently are:",{"type":9,"tag":140,"props":170,"children":173},{"className":171,"code":172,"language":14},[143],"cd projects/website\n",[174],{"type":9,"tag":17,"props":175,"children":176},{"__ignoreMap":148},[177],{"type":14,"value":172},{"type":9,"tag":10,"props":179,"children":180},{},[181],{"type":14,"value":182},"Relative paths are shorter to type and are what you'll use most. Absolute paths are unambiguous and are what you'll use in scripts, where \"wherever you currently are\" isn't something you can rely on.",{"type":9,"tag":10,"props":184,"children":185},{},[186],{"type":14,"value":187},"There are four shorthands worth memorising today:",{"type":9,"tag":189,"props":190,"children":191},"ul",{},[192,203,214,231],{"type":9,"tag":193,"props":194,"children":195},"li",{},[196,201],{"type":9,"tag":17,"props":197,"children":199},{"className":198},[],[200],{"type":14,"value":39},{"type":14,"value":202}," — the current directory",{"type":9,"tag":193,"props":204,"children":205},{},[206,212],{"type":9,"tag":17,"props":207,"children":209},{"className":208},[],[210],{"type":14,"value":211},"..",{"type":14,"value":213}," — the parent directory (one level up)",{"type":9,"tag":193,"props":215,"children":216},{},[217,223,225],{"type":9,"tag":17,"props":218,"children":220},{"className":219},[],[221],{"type":14,"value":222},"~",{"type":14,"value":224}," — your home directory, e.g. ",{"type":9,"tag":17,"props":226,"children":228},{"className":227},[],[229],{"type":14,"value":230},"/home/you",{"type":9,"tag":193,"props":232,"children":233},{},[234,240,242,248,250,255,257,263],{"type":9,"tag":17,"props":235,"children":237},{"className":236},[],[238],{"type":14,"value":239},"-",{"type":14,"value":241}," — the directory you were in ",{"type":9,"tag":243,"props":244,"children":245},"em",{},[246],{"type":14,"value":247},"before",{"type":14,"value":249}," the last ",{"type":9,"tag":17,"props":251,"children":253},{"className":252},[],[254],{"type":14,"value":80},{"type":14,"value":256},", which makes ",{"type":9,"tag":17,"props":258,"children":260},{"className":259},[],[261],{"type":14,"value":262},"cd -",{"type":14,"value":264}," a toggle between two places",{"data":266,"body":267},{},{"type":6,"children":268},[269],{"type":9,"tag":270,"props":271,"children":276},"quiz",{":answer":272,":options":273,"explanation":274,"question":275},"0","[\"/home/you\",\"/home/you/projects\",\"/home\",\"The root directory, /\"]","Each `..` climbs one level. From /home/you/projects/website, the first takes you to projects, the second to /home/you.","You are in /home/you/projects/website. Where does `cd ../..` put you?",[],{"data":278,"body":279},{},{"type":6,"children":280},[281,294,306,315,336],{"type":9,"tag":50,"props":282,"children":284},{"id":283},"reading-ls-properly",[285,287,292],{"type":14,"value":286},"Reading ",{"type":9,"tag":17,"props":288,"children":290},{"className":289},[],[291],{"type":14,"value":72},{"type":14,"value":293}," properly",{"type":9,"tag":10,"props":295,"children":296},{},[297,299,304],{"type":14,"value":298},"Bare ",{"type":9,"tag":17,"props":300,"children":302},{"className":301},[],[303],{"type":14,"value":72},{"type":14,"value":305}," gives you names. The options are where it gets useful:",{"type":9,"tag":140,"props":307,"children":310},{"className":308,"code":309,"language":14},[143],"ls -l     # long format: permissions, owner, size, modified date\nls -a     # include hidden files (anything starting with a dot)\nls -lh    # long format, human-readable sizes (4.0K instead of 4096)\nls -lt    # sort by modification time, newest first\n",[311],{"type":9,"tag":17,"props":312,"children":313},{"__ignoreMap":148},[314],{"type":14,"value":309},{"type":9,"tag":10,"props":316,"children":317},{},[318,320,326,328,334],{"type":14,"value":319},"Options can be combined, so ",{"type":9,"tag":17,"props":321,"children":323},{"className":322},[],[324],{"type":14,"value":325},"ls -lah",{"type":14,"value":327}," is the same as ",{"type":9,"tag":17,"props":329,"children":331},{"className":330},[],[332],{"type":14,"value":333},"ls -l -a -h",{"type":14,"value":335}," and is worth building into muscle memory.",{"type":9,"tag":10,"props":337,"children":338},{},[339,341,346,348,354,356,362,363,369,371,377],{"type":14,"value":340},"\"Hidden\" files aren't secure or special — the rule is literally just ",{"type":9,"tag":243,"props":342,"children":343},{},[344],{"type":14,"value":345},"\"the name starts with a dot\"",{"type":14,"value":347},". It's a convention to keep config files (",{"type":9,"tag":17,"props":349,"children":351},{"className":350},[],[352],{"type":14,"value":353},".bashrc",{"type":14,"value":355},", ",{"type":9,"tag":17,"props":357,"children":359},{"className":358},[],[360],{"type":14,"value":361},".gitignore",{"type":14,"value":355},{"type":9,"tag":17,"props":364,"children":366},{"className":365},[],[367],{"type":14,"value":368},".env",{"type":14,"value":370},") out of your way. ",{"type":9,"tag":17,"props":372,"children":374},{"className":373},[],[375],{"type":14,"value":376},"ls -a",{"type":14,"value":378}," reveals them.",{"data":380,"body":381},{},{"type":6,"children":382},[383],{"type":9,"tag":384,"props":385,"children":391},"fill-blank",{":answer":386,"explanation":387,"hint":388,"placeholder":389,"prompt":390},"[\"ls -lah\",\"ls -alh\",\"ls -lha\",\"ls -hla\",\"ls -ahl\",\"ls -hal\"]","Any order works. `ls -lah` is the one most people's fingers learn.","You need three options — long, all, human-readable. Their order doesn't matter.","ls ...","List everything in the current directory, including hidden files, in long format with readable sizes.",[],{"data":393,"body":394},{},{"type":6,"children":395},[396,402,414],{"type":9,"tag":50,"props":397,"children":399},{"id":398},"let-the-shell-type-for-you",[400],{"type":14,"value":401},"Let the shell type for you",{"type":9,"tag":10,"props":403,"children":404},{},[405,407,412],{"type":14,"value":406},"Press ",{"type":9,"tag":34,"props":408,"children":409},{},[410],{"type":14,"value":411},"Tab",{"type":14,"value":413}," while typing a path and the shell will complete it. Press it twice and it shows you every possibility.",{"type":9,"tag":10,"props":415,"children":416},{},[417],{"type":14,"value":418},"This is not a nicety. Tab completion is the difference between the command line feeling slow and feeling fast, and it doubles as a correctness check — if Tab won't complete what you're typing, the thing you're referring to probably doesn't exist. Experienced people almost never type a full path.",{"data":420,"body":421},{},{"type":6,"children":422},[423],{"type":9,"tag":424,"props":425,"children":427},"deep-dive",{"title":426},"Directories worth recognising",[428,433,507],{"type":9,"tag":10,"props":429,"children":430},{},[431],{"type":14,"value":432},"You don't need to memorise the filesystem, but recognising these saves a lot of confusion:",{"type":9,"tag":189,"props":434,"children":435},{},[436,452,463,474,485,496],{"type":9,"tag":193,"props":437,"children":438},{},[439,444,446,451],{"type":9,"tag":17,"props":440,"children":442},{"className":441},[],[443],{"type":14,"value":230},{"type":14,"value":445}," — your stuff. Also written ",{"type":9,"tag":17,"props":447,"children":449},{"className":448},[],[450],{"type":14,"value":222},{"type":14,"value":39},{"type":9,"tag":193,"props":453,"children":454},{},[455,461],{"type":9,"tag":17,"props":456,"children":458},{"className":457},[],[459],{"type":14,"value":460},"/etc",{"type":14,"value":462}," — system-wide configuration files. Text, all of it.",{"type":9,"tag":193,"props":464,"children":465},{},[466,472],{"type":9,"tag":17,"props":467,"children":469},{"className":468},[],[470],{"type":14,"value":471},"/var/log",{"type":14,"value":473}," — logs. The first place to look when something is broken.",{"type":9,"tag":193,"props":475,"children":476},{},[477,483],{"type":9,"tag":17,"props":478,"children":480},{"className":479},[],[481],{"type":14,"value":482},"/usr/bin",{"type":14,"value":484}," — most of the programs you run.",{"type":9,"tag":193,"props":486,"children":487},{},[488,494],{"type":9,"tag":17,"props":489,"children":491},{"className":490},[],[492],{"type":14,"value":493},"/tmp",{"type":14,"value":495}," — scratch space, wiped on reboot.",{"type":9,"tag":193,"props":497,"children":498},{},[499,505],{"type":9,"tag":17,"props":500,"children":502},{"className":501},[],[503],{"type":14,"value":504},"/opt",{"type":14,"value":506}," — optional or third-party software.",{"type":9,"tag":10,"props":508,"children":509},{},[510,512,517,519,524],{"type":14,"value":511},"The pattern to notice is that configuration is text in ",{"type":9,"tag":17,"props":513,"children":515},{"className":514},[],[516],{"type":14,"value":460},{"type":14,"value":518},", and diagnostics are text in ",{"type":9,"tag":17,"props":520,"children":522},{"className":521},[],[523],{"type":14,"value":471},{"type":14,"value":525},". This is why the command line remains the fastest way to debug a Linux machine — the answers are all in files you can read.",{"data":527,"body":528},{},{"type":6,"children":529},[530,536],{"type":9,"tag":270,"props":531,"children":535},{":answer":272,":options":532,"explanation":533,"question":534},"[\"Its name begins with a dot\",\"A hidden attribute is set on it\",\"It lives in a system directory\",\"Its permissions exclude your user\"]","That's the entire rule. `ls` skips dot-prefixed names unless you pass `-a`. It is a convention, not a security feature.","What makes a file \"hidden\" in Linux?",[],{"type":9,"tag":10,"props":537,"children":538},{},[539],{"type":14,"value":540},"Next: creating, moving, and deleting things — including the one command that has no undo.",1787908866326]