How Linux
Works
BRYAN BENT
COPYRIGHT All rights reserved. This book or any portion thereof may not be reproduced, or used in any manner whatsoever without the express written permission of the publisher except for the use of brief quotation in a book review.
TABLE OF CONTENTINTRODUCTION Before dvng hdfrt nt the wnk wrld of GNU/Lnux systems, t' important t undrtnd hw th came but nd some f the trm you may nuntr while rrhng nd ung them. I'll trt with a brf history f the bg three: UNIX, Linux, nd GNU. UNIX a rrtr, mmnd-ln bd rtng system rgnll dvld by Dnn Rth nd Kn Thompson (mng thr) t AT&T's Bell Lb n th lt 1960 nd rl 1970. UNIX dd lmt entirely n the C rgrmmng language (l invented by Rth) nd was rgnll ntndd to be used as a rtbl nd convenient OS fr programmers nd rrhr.
As a result f a lng nd mltd legal htr nvlvng AT&T, Bell Lb, and th fdrl gvrnmnt, UNIX nd UNIX-lk operating tm grw in popularity, dd Thmn' influential philosophy f a modular, mnmlt rh to ftwr dgn. The mdrn operating tm w use vr d, uh Windows nd mOS, r md of mn, many dffrnt (nd very thnl) mnnt, nludng 9 krnl tht hl ftwr mmunt wth hardware nd th graphical ur ntrf (GUI) elements you n screen. Try thinking about, fr example, how mvng th mouse trnlt to the cursor mvng across th rn or how a fl trd on your ld-tt drv. Smngl simple tk are tull mmnl mlx whn you undrtnd ll the mnnt n play and how ukl mdrn mutr can rfrm th tn. Wndw and macOS r dgnd t rt wth little frtn bl, users ml don't nd to undrtnd hw thng work behind th n. In other words, vrthng bnth the grhl user interface (GUI) functionally rrlvnt t mt users.
Now, lt' move t GNU/Lnux dtr. A dtr (hrt fr distribution) bt thught f as a ntl wrd kg f th r ftwr components that make up a GNU/Lnux rtng tm. Consider distros lk Fedora, Elmntr OS, Linux Mint, Manjaro, Ubuntu as rughl th functional uvlnt f Windows nd mOS. A typical GNU/Lnux distribution nlud th Lnux kernel; GNU tl and lbrr; a windowing tm fr dlng 12 windows on rn and ntrtng with input dv; a dkt environment fr rfrmng tn with OS rgrm; nd ddtnl rt. Evn th rdng description is a vast mlftn. Sm f th most mmn dkt nvrnmnt r GNU' GNOME, KDE' Plm, MATE, nd XFCE.
Dffrnt flavors f dtr use dffrnt dkt environmentsfancier r leaner, more or less lk Mrft Wndw, r whtvrbut th r components f th OS r th m. A software frm or rgnztn typically packages ll these rt and creates n 13 ISO fl (thnll, th compressed mg f n installation CD-ROM or DVD), which ur can dwnld nd ntll n their computers. For xml, Cnnl is th mn tht mng th rl f th popular dtr Ubuntu; Mrft nd Al funtn n a similar rl whn rlng nw vrn f Wndw r mOS. If u'r skilled enough, you n hrr-k mnnt nd kg a distro f ur own, but we won't gt nt that hr. A mntnd, Al' nd Mrft' platforms r just as mlx, but I'll rnt a mlrl simplified vrvw f their r components. Th r f mOS a UNIX-like OS lld Drwn built on a UNIX-lk hbrd krnl lld XNU (X not UNIX).
Th Au nd Fndr GUI lmnt r jut m f th additional components tht mr th full macOS system. Chrome OS bd n Chrmum OS nd th Lnux kernel. Windows 10 is a mmbr of th Wndw NT fml nd uses a hbrd krnl and th Windows Shll. On a d nt, Microsoft continues t bult ut funtnlt fr t Windows Subtm for Lnux (WSL), whh ddd th full Lnux krnl to Wndw 10. I wuld b remiss nt to tt tht runnng a GNU/Lnux tm nt like runnng macOS or Wndw, ll for rgulr ur. Simple tasks dn't lw work as you'd expect.
Fr ntn, ntllng rgrm nt 16 lw trghtfrwrd vn if u use a dtr' bult-n tr, whh mght nt have the ltt vrn f various rgrm. For uh tasks, u nd t b wllng t t least learn the basics f th trmnl r td mmnd-ln ntrf. Snnr, multfuntn rntr, and thr peripherals rnt hllng, 17 too, drvr ntlltn r not easy t trublht. Be prepared to spend a lt f tm rlrnng how t d basic tasks n nw w and t rh for solutions in vru frum ttrd r th web. If u gt frustrated l wth thnlg, GNU/Lnux systems r nt the bt fit. Ultimately, whether n n-ur OS th rrt choice fr you depends n hw u u your mutr.
If u'r a rgrmmr, you m rfr a stable, trd-bk dgn. If you have a r or older PC lng rund the hu, 18 a lightweight GNU/Lnux dtr mght gv it nw life. On major rn u mght consider ung a GNU/Lnux dtr tht mn r technically fr, lthugh you huld rtnl ntrbut what u can t th mmunt tht mntn ur distro f h. Although th r f th rtng system n't mthng u tll consider whn bung a PC, t mght b a factor if you r building your wn dkt. You can bu a Wndw 10 Home license, but that wll run u t least $139. Yu can't even gt mOS unless u for Apple hrdwr.
Anthr temptation fr m users the customizability and flexibility f n ur GNU/Linux tm. As ttd, mn distros support different dkt nvrnmnt, each f whh n ffr a fresh ntrf. Stll nthr drw is lng-trm urt nd stability. Many distro dvlr mntn rl for years nd dn't require u to udt f u dn't wnt to. Th hl mntn ntn and nur fwr brkdwn. The move frm Wndw 7 to Wndw 8 url a strong nugh xml f th rl f hngng t mn thng too ukl.
Yu may also appreciate one f th hlh tht gud mn GNU/Linux projects. Yu'll hr uh terms as Libre (fr in frdm, not cost); FOSS (Fr and On Source); nd FLOSS (Free/Libre nd Open Sur). GNU ffr a mr in-depth xlntn of th different m within th fr ftwr mvmnt. Hwvr, for tudnt nd hm ur wth lttl r n thnl xrt wh ml don't wnt t b bthrd wth unforeseen complications, thr' blutl n hm in wanting a computer that mk ur lf easier. Fr 21 th ur, Windows nd macOS r much more familiar and thus more ntutv, nd trublhtng mt problems n b dn wthut ndng Cmmnd Prompt or Trmnl rtvl. It' nt ll a lost u, thugh.
Yu can still gt ulr brwr uh Chrm, Firefox, nd th Tor Brwr (Microsoft is brngng the nw Edge t Lnux, t); mmuntn tl uh as Sgnl nd Slack; urt software uh VPN nd wrd mngr; and multmd ntl such VLC Plr. Skng f VPN, th Lnux 22 krnl now urt th WrGurd VPN rtl. AV ftwr fr Linux is nt common, but m tn nlud Clm AV nd Sh. Stm vlbl for Dbn-bd GNU/Lnux OSes, though u may have luk wth thr distros if u r willing to nur your OS meets the installation requirements. Altrntvl, u can u Valve's gaming-centric StmOS dtr, whh tlf is based on Dbn. Nt that a grwng number f games, including AAA ttl, urt GNU/Lnux thr natively r wth hl from Steam's Proton tl.
Vlv even nnund tht 23 t ltt VR game, Half-Life: Alx wll gt a full release fr Lnux platforms. Thr are tll n native vrn f Blzzrd' Bttl.Nt, E' Game Store, and EA' Orgn ltn for GNU/Lnux tm, but u may be able t get your favorite game lunhr ltn nd non-Steam gm runnng with Steam's Prtn tool r emulator alternatives uh Lutr or Wine. BASIC COMMANDS ND
DIRECTORY HIERARCHY
Wh Unix mmnd? Int this a bk about hw Linux works? It , f course, but Lnux a Unx flvr t heart. Yull th word Unx n th chapter more than Lnux bu u can take wht you lrn straight vr to Slr, BSD, nd other Unx-flvrd tm. Iv ttmtd to avoid vrng t many Linux-specific ur ntrf xtnn, nt nl t give you a better bkgrund fr ung th other operating tm, but l bu th xtnn tnd t b unstable.
Th Burn Shell: /bn/h Th shell n f the mt mrtnt rt of a Unx system.
Th Burn Shell: /bn/h Th shell n f the mt mrtnt rt of a Unx system.
A hll a program that run mmnd, lk the ones tht ur ntr. Th shell also rv as a mll programming environment. Unix rgrmmr ftn break mmn tk nt little mnnt and u the hll t manage tasks nd piece thng together. Mn important parts f th system are tull hll rttxt fl tht ntn a sequence of shell mmnd. If youve wrkd with MS-DOS previously, u n think f shell rt as very wrful .BAT files. Because thr important, Chapter 11 dvtd ntrl t hll rt.
Next page