想學習 Linux,裝個虛擬機,裝哪個發行版好?
建議學習《鳥哥的私房菜》,然後安裝一個發行版,如centos,redhat(rpm系列);也可以使用debian系列(如ubuntu,特點就是簡單,但是和redhat不太一樣,redhat系列的使用的特別多,不過現在ubuntu使用的人也很多,一般問題都可以找到相應答案的),就我個人看的話,這兩個系列入門都已經足夠了,但如果你想提高可以使用gentoo,archlinux,freebsd,這些都是使用滾動更新的方式,就是沒有版本的概念,你可以用一條命令將系統更新到最新的時間戳,他們的包管理機制都是使用ports,很好使用的,如果你想提升至更高檔次,就可以學習LFS,Linux from scratch,就是從一個內核源碼打造一個你自己的Linux發行版,這個可以讓你學習深入一些,如果你想更深入下去,你可以學習Linux下Shell腳本編程,perl腳本編程,Linux下C語言編程,最終你可以看下Linux v0.01源碼,這個只有10000行源碼,少量的彙編源碼,都是關於x86架構的。
一下是Linus寫的linux v0.01 release notes-linus: 1 23
4 Notes for linux release 0.01 5 6 7 0. Contents of this directory 8 9 linux-0.01.tar.Z - sources to the kernel10 bash.Z - compressed bash binary if you want to test it11 update.Z - compressed update binary12 RELNOTES-0.01 - this file13
14 15 1. Short intro16 17 18 This is a free minix-like kernel for i386(+) based AT-machines. Full19 source is included, and this source has been used to produce a running20 kernel on two different machines. Currently there are no kernel21 binaries for public viewing, as they have to be recompiled for different22 machines. You need to compile it with gcc (I use 1.40, don"t know if23 1.37.1 will handle all __asm__-directives), after having changed the
24 relevant configuration file(s). 25 26 As the version number (0.01) suggests this is not a mature product. 27 Currently only a subset of AT-hardware is supported (hard-disk, screen,28 keyboard and serial lines), and some of the system calls are not yet29 fully implemented (notably mount/umount aren"t even implemented). See30 comments or readme"s in the code.31 32 This version is also meant mostly for reading - ie if you are interested33 in how the system looks like currently. It will compile and produce a
34 working kernel, and though I will help in any way I can to get it35 working on your machine (mail me), it isn"t really supported. Changes36 are frequent, and the first "production" version will probably differ37 wildly from this pre-alpha-release. 38 39 Hardware needed for running linux:40 - 386 AT41 - VGA/EGA screen42 - AT-type harddisk controller (IDE is fine)43 - Finnish keyboard (oh, you can use a US keyboard, but not
44 without some practise 45 46 The Finnish keyboard is hard-wired, and as I don"t have a US one I47 cannot change it without major problems. See kernel/keyboard.s for48 details. If anybody is willing to make an even partial port, I"d be49 grateful. Shouldn"t be too hard, as it"s tabledriven (it"s assembler50 though, so ...)51 52 Although linux is a complete kernel, and uses no code from minix or53 other sources, almost none of the support routines have yet been coded.
54 Thus you currently need minix to bootstrap the system. It might be55 possible to use the free minix demo-disk to make a filesystem and run56 linux without having minix, but I don"t know...57 58 59 2. Copyrights etc60 61 62 This kernel is (C) 1991 Linus Torvalds, but all or part of it may be63 redistributed provided you do the following:
64 65 - Full source must be available (and free), if not with the66 distribution then at least on asking for it.67 68 - Copyright notices must be intact. (In fact, if you distribute69 only parts of it you may have to add copyrights, as there aren"t70 (C)"s in all files.) Small partial excerpts may be copied71 without bothering with copyrights.7273 - You may not distibute this for a fee, not even "handling"
74 costs.75 76 Mail me at "torvalds@kruuna.helsinki.fi" if you have any questions.77 78 Sadly, a kernel by itself gets you nowhere. To get a working system you79 need a shell, compilers, a library etc. These are separate parts and may80 be under a stricter (or even looser) copyright. Most of the tools used81 with linux are GNU software and are under the GNU copyleft. These tools82 aren"t in the distribution - ask me (or GNU) for more info.83
84 85 3. Short technical overview of the kernel.86 87 88 The linux kernel has been made under minix, and it was my original idea89 to make it binary compatible with minix. That was dropped, as the90 differences got bigger, but the system still resembles minix a great91 deal. Some of the key points are:92 93 - Efficient use of the possibilities offered by the 386 chip.94 Minix was written on a 8088, and later ported to other95 machines - linux takes full advantage of the 386 (which is96 nice if you /have/ a 386, but makes porting very difficult)97 98 - No message passing, this is a more traditional approach to99 unix. System calls are just that - calls. This might or might100 not be faster, but it does mean we can dispense with some of101 the problems with messages (message queues etc). Of course, we102 also miss the nice features :-p.103 104 - Multithreaded FS - a direct consequence of not using messages.105 This makes the filesystem a bit (a lot) more complicated, but106 much nicer. Coupled with a better scheduler, this means that107 you can actually run several processes concurrently without108 the performance hit induced by minix.109 110 - Minimal task switching. This too is a consequence of not using111 messages. We task switch only when we really want to switch112 tasks - unlike minix which task-switches whatever you do. This113 means we can more easily implement 387 support (indeed this is114 already mostly implemented)115 116 - Interrupts aren"t hidden. Some people (among them Tanenbaum)117 think interrupts are ugly and should be hidden. Not so IMHO.118 Due to practical reasons interrupts must be mainly handled by119 machine code, which is a pity, but they are a part of the code120 like everything else. Especially device drivers are mostly121 interrupt routines - see kernel/hd.c etc.122 123 - There is no distinction between kernel/fs/mm, and they are all124 linked into the same heap of code. This has it"s good sides as125 well as bad. The code isn"t as modular as the minix code, but126 on the other hand some things are simpler. The different parts127 of the kernel are under different sub-directories in the128 source tree, but when running everything happens in the same129 data/code space.130 131 The guiding line when implementing linux was: get it working fast. I132 wanted the kernel simple, yet powerful enough to run most unix software.133 The file system I couldn"t do much about - it needed to be minix134 compatible for practical reasons, and the minix filesystem was simple135 enough as it was. The kernel and mm could be simplified, though:136 137 - Just one data structure for tasks. "Real" unices have task138 information in several places, I wanted everything in one139 place.140 141 - A very simple memory management algorithm, using both the142 paging and segmentation capabilities of the i386. Currently143 MM is just two files - memory.c and page.s, just a couple of144 hundreds of lines of code.145 146 These decisions seem to have worked out well - bugs were easy to spot,147 and things work.148 149 150 4. The "kernel proper"151 152 153 All the routines handling tasks are in the subdirectory "kernel". These154 include things like "fork" and "exit" as well as scheduling and minor155 system calls like "getpid" etc. Here are also the handlers for most156 exceptions and traps (not page faults, they are in mm), and all157 low-level device drivers (get_hd_block, tty_write etc). Currently all158 faults lead to a exit with error code 11 (Segmentation fault), and the159 system seems to be relatively stable ("crashme" hasn"t - yet).160 161 162 5. Memory management163 164 165 This is the simplest of all parts, and should need only little changes.166 It contains entry-points for some things that the rest of the kernel167 needs, but mostly copes on it"s own, handling page faults as they168 happen. Indeed, the rest of the kernel usually doesn"t actively allocate169 pages, and just writes into user space, letting mm handle any possible170 "page-not-present" errors.171 172 Memory is dealt with in two completely different ways - by paging and173 segmentation. First the 386 VM-space (4GB) is divided into a number of174 segments (currently 64 segments of 64Mb each), the first of which is the175 kernel memory segment, with the complete physical memory identity-mapped176 into it. All kernel functions live within this area. 177 178 Tasks are then given one segment each, to use as they wish. The paging179 mechanism sees to filling the segment with the appropriate pages,180 keeping track of any duplicate copies (created at a "fork"), and making181 copies on any write. The rest of the system doesn"t need to know about182 all this.183 184 185 6. The file system186 187 188 As already mentioned, the linux FS is the same as in minix. This makes189 crosscompiling from minix easy, and means you can mount a linux190 partition from minix (or the other way around as soon as I implement191 mount :-). This is only on the logical level though - the actual192 routines are very different.193 194 NOTE! Minix-1.6.16 seems to have a new FS, with minor195 modifications to the 1.5.10 I"ve been using. Linux196 won"t understand the new system.197 198 The main difference is in the fact that minix has a single-threaded199 file-system and linux hasn"t. Implementing a single-threaded FS is much200 easier as you don"t need to worry about other processes allocating201 buffer blocks etc while you do something else. It also means that you202 lose some of the multiprocessing so important to unix.203 204 There are a number of problems (deadlocks/raceconditions) that the linux205 kernel needed to address due to multi-threading. One way to inhibit206 race-conditions is to lock everything you need, but as this can lead to207 unnecessary blocking I decided never to lock any data structures (unless208 actually reading or writing to a physical device). This has the nice209 property that dead-locks cannot happen. 210 211 Sadly it has the not so nice property that race-conditions can happen212 almost everywhere. These are handled by double-checking allocations etc213 (see fs/buffer.c and fs/inode.c). Not letting the kernel schedule a214 task while it is in supervisor mode (standard unix practise), means that215 all kernel/fs/mm actions are atomic (not counting interrupts, and we are216 careful when writing those) if you don"t call "sleep", so that is one of217 the things we can count on.218 219 220 7. Apologies 221 222 223 This isn"t yet the "mother of all operating systems", and anyone who224 hoped for that will have to wait for the first real release (1.0), and225 even then you might not want to change from minix. This is a source226 release for those that are interested in seeing what linux looks like,227 and it"s not really supported yet. Anyone with questions or suggestions228 (even bug-reports if you decide to get it working on your system) is229 encouraged to mail me. 230 231 232 8. Getting it working233 234 235 Most hardware dependancies will have to be compiled into the system, and236 there a number of defines in the file "include/linux/config.h" that you237 have to change to get a personalized kernel. Also you must uncomment238 the right "equ" in the file boot/boot.s, telling the bootup-routine what239 kind of device your A-floppy is. After that a simple "make" should make240 the file "Image", which you can copy to a floppy (cp Image /dev/PS0 is241 what I use with a 1.44Mb floppy). That"s it. 242 243 Without any programs to run, though, the kernel cannot do anything. You244 should find binaries for "update" and "bash" at the same place you found245 this, which will have to be put into the "/bin" directory on the246 specified root-device (specified in config.h). Bash must be found under247 the name "/bin/sh", as that"s what the kernel currently executes. Happy248 hacking. 249 250 251 Linus Torvalds "torvalds@kruuna.helsinki.fi"252 Petersgatan 2 A 2253 00140 Helsingfors 14254 FINLANDlinux-0.01.tar.gz--&> linux-0.01.tar.gz (71.38 KB)
###linux-0.01.tar.gz.sgin###-----BEGIN PGP SIGNATURE-----Version: GnuPG v1.0.0 (GNU/Linux)Comment: See http://www.kernel.org/signature.html for infoiD8DBQA54rf0yGugalF9Dw4RAqelAJ9lafFni4f/QyJ2IqDXzW2nz/ZIogCfRPtguYpWffOhkyByfhUt8Lcelec==KnLA-----END PGP SIGNATURE-----如果你有耐心的話,可以試試archlinux
既然lz說是學習linux,那麼就裝傻瓜式的ubuntu吧
看看手中的教程是用什麼發行版的就用什麼。第一次用 Linux 參照教程來。等熟悉了以後,選擇什麼樣的發行版就不是問題了。
對於初學者而言,CentOS+《鳥哥的私房菜》應該是最好的組合吧。
就自己折騰的經驗來說還是Linux Mint比較靠譜。依靠發行版Ubuntu開發,可以定期更新。
virtualbox加centos(伺服器方向),個人用就去搞ubuntu吧
做網頁,搞伺服器什麼的用CentOS吧,比較常用,至於桌面用途的話,ubuntu比較簡單,基於ubuntu的國產linux deepin也不錯
先用個圖形界面的發行版過渡下,然後轉CentOS這類純命令行的吧
推薦閱讀: