Some advice to the FreeBSD novice

Source: Internet
Author: User
Tags add file copy file system ftp interface sort window root directory
As a bsder, the most on the Internet is the UNIX-related forum, in the process of contact with many novice, found that a large number of people from Windows turned over (almost "most"), in learning FreeBSD will encounter a lot of difficulties, Even think Unix class system is extremely difficult to use, here, I summed up my experience for your reference.

The first is how to get the problem, Windows is sold everywhere, even some Linux, such as Redhat,mandrake and so on are sold, but Freebsd,netbsd and other Unix does not seem to have seen the sale-at least in Chongqing. The best way to get BSD is to download it via the web, such as FreeBSD's official site ftp://ftp.freebsd.org,ftp://ftp.cnfug.org, or some sites that specialize in free software downloads, such as http:// Www.wormwang.net and so on can download related systems and applications. If you do not have the conditions to download online friends, you can often go to the forum to find friends with their own city to help carve a plate, usually we will be more willing to.

Second, install. Installing an operating system necessarily involves partitioning. However, zoning is a nightmare for many people ... Because partitioning means that data is lost and even the entire partition table is lost. BSD partitioning, in particular, is a headache for many, since BSD inherits Unix's traditional concept of disk Management, where PCs have not yet appeared, so the concept of "zoning" in a PC is not in the BSD traditional disk Management mechanism. It is divided into a slice to manage the disk (if the FreeBSD interested friends can refer to Wangbo's "FreeBSD Use Encyclopedia" or "FreeBSD Handbook"). The concept of slice is introduced because it is closely related to the concept of "mount point" later. Since there is no partitioning concept in Unix, BSD cannot understand the concept of extended partitioning, so it must be installed in the primary partition. Then divide the slice in them. and slice is transparent to programs and users in the file system and is not as visible as partitions. After you assign slice, you also assign "mount point" to it, which is equivalent to the work of the partition-allocation drive under Windows. Only slice that are assigned mount points can be mounted and available by the operating system. UNIX's file system composition is also completely different from windows, which is described in detail later. Of course, to be compatible with other operating systems, the FreeBSD installer also provides fdisk that supports the "zoning" concept. However, FreeBSD must be installed on the primary partition (but unlike Linux, which requires a separate swap partition, FreeBSD swap is only a slice of its partition), so FreeBSD does not support operations on logical partitions, it shows only extended partitions, and treat it as a primary partition, and you must be particularly careful about this. When the partition is complete, start the installation, there is nothing special about this step, the only special virtue is FreeBSD can not install GUI (Graphic user Interface, graphical user interface).

After the file copy process has finished, configure, but the configuration process is not difficult, look at the prompts to know what to do. Next, make a X-window configuration (note!) It's X-window, there's no x-windows this thing. This is an error that many users in Windows are making easy to make, and X-window is now able to identify most of the hardware, especially the mainstream hardware, so there is no need to intervene too much. After the X-window configuration, we have to select either the Window Manager (Windows Maker) or the desktop Environment (Desktop environment), otherwise we can only use the default primitive TWM interface. Here to illustrate: Unix-like system itself is a character, X-window is a Unix-like system running a program, but also the Unix class system most commonly used GUI. Entering STARTX under the character interface can start "XFree86", which is one of the most popular branches of X-window, which we usually call "X". But the Windows95 x is very ugly (and it is no exaggeration to say that it looks better than it is). But you just saw the original face of X, and it's even better than the gui! of Mac OS X. X's design philosophy is much like the Unix philosophy of Design: "Tools,no policy! (Tools, not strategies!) "These things do not dictate what end users do, they provide tools, and the user decides what to do with them." X did not specify what the GUI it provided looked like, but instead gave the task to another program that was the window manager (Windows Maker). There are many such programs, such as afterstep,blackbox,enlightenment,ctwm,ftwm,sawfish,windowmaker (note the difference between the Windows maker) and so on. They look very different, some look like Mac OS, some look like landscapes, some look like sci-fi stuff, and some even look just like Microsoft Windows! Another concept is the desktop environment (Desk environment), which is a collection of window managers and apps, most notably KDE and GNOME. New users are recommended to use KDE or gnome because they are simply configured to help you learn FreeBSD in a shorter period of time rather than being intimidated by complex settings. Of course, it's also a good idea to try a different style of window manager after you're familiar with the system and X! ^_^

Once the installation is complete, you can reboot the machine into the system. Remember a bit (very important): the Unix class system does not echo the password (that is, you don't see the familiar asterisk hint under windows when you enter the password), at least in the character interface. Do not mistakenly think that the keyboard is out of the question Oh! ^_^ This is for security reasons, because echo means that the length of the password will be exposed, which is very unsafe. After entering the system, we must understand its file system in order to operate. Just said, slice is transparent to the user. You can't see the familiar c:,d:,e under the FreeBSD: It's a lot of files and directories. Unix class systems are the inverted tree directory structure used to load partitions or slice through mount points, and users simply do not feel they exist. In the FreeBSD system, the root directory (/) is the vertex of the directory tree, below it is/dev (the directory where the device files reside),/etc (the directory where the configuration file is located),/home (the normal user's home directory),/root (root user directory),/bin (Common program directory) Sbin (System Manager directory),/tmp (temporary file directory),/mnt (Temporary mount point directory), etc. level two directory, there are many small directories below them, so that at the level of the derivative ... You can browse the directory by inputting LS, which is equivalent to entering dir/w in DOS or win2000/xp/2003 cmd window. If you want to know the details of the file, you can enter Ls–l. In addition, LS does not have a paging display parameter similar to DIR, but you can pass the LS | More or LS | Less to achieve the same purpose. After browsing the file systems of Unix-like systems, you can see that their filesystem is a unified (only one root directory), complete (not because slice or partitions are divided into similar c:,d:,e: parallel "Partitions"), Complex (can have n multiple subdirectories and files in each directory) tree-shaped structure.

Also, mention the problem of loading separately. Traditional UNIX management, for security reasons, does not automatically load any file system other than its own file system-even if it recognizes them, especially discs and floppy disks. FreeBSD also inherits such management, so that any file system other than FreeBSD's file system usually needs to be manually loaded, and you may find this cumbersome, but it's safer. The load command is mount, as far as usage is concerned, I will not say more. The reason for this is that UNIX class systems are traditionally managed for any other partition, so under FreeBSD, they are/dev/ad0s1,/dev/ad0s2,/dev/ad0s5,/dev/ad0s7, not Windows C:, D:,e:,f:. Explain this here. FreeBSD, ad represents a hard disk device (note: FreeBSD 3.x and its previous use is WD), 0 represents the first primary device (that is, the primary device for the first IDE port), S is the abbreviation for slice, 1 is the first primary partition, and 5 is the first logical partition. Under FreeBSD CDROM's name is/DEV/ACD0 (the first CDROM device number is 0), (note that case, UNIX class systems are case-sensitive, in any case!). So/dev/cdrom and/dev/cdrom are definitely not the same thing. You can also add related entries to/etc/fstab to achieve the purpose of automatic loading, but do not automatically load the CDROM and floppy drive, otherwise the system will start complaining that it can not load, or even start an error. To automatically load the floppy disk or CD when you use it, consider using "AMD (Auto Mounting Daemon", automatic load daemon), please refer to the relevant materials for details.

Also, many friends may find that there are few entry-level books on UNIX-class system commands, and the most powerful UNIX-like system is its commands! As the design philosophy of Unix says: "Tools,no policy! "We can use them to do everything. Here's a reminder that UNIX-class systems have a more powerful online Help system than Windows-"man"! If you want to know more about a command, you can find it in the form of a man command name, and there will be no small gain. FreeBSD and some distributions of Linux can even use the MAN–K keyword to find command names related to an action or topic, such as looking for a print-related command, and you can enter man–k print. Unix class system commands are numerous, and no one is expected to remember all the commands and their parameters (otherwise the person is either a genius or a madman). In addition, FreeBSD Handbook is also very good information, suggested to see.

Finally, to talk about the design philosophy of Unix--tools,no policy! It is often said that "toolbox". Typical UNIX commands--such as Ls,more,less,print,sort, and so on--are done with only one or a few specific jobs. LS is a directory List command, less or more is a paging display command, sort is a sorting command, and print is a printing command. At first glance they seem irrelevant-at least in DOS and Windows. However, their combination allows you to get the results you want. For example, you want to make a list of directories and display them in pages. command is LS | Less. Perhaps you feel trouble, not as dir/p convenient. But what if you want the directory to list and sort it, and then page it out, Windows or DOS? In a Unix class system, you can simply add a sort command--ls | Sort–n | Less. If you also want to print out the results, then add a print can be LS | Sort–n | Less | Print Isn't it convenient? ^_^ you don't need to find another program to do the job, just use the tools you have in hand. Unix commands or procedures have their own characteristics and role. When used alone, they are not strong, their flexibility is their strong place, you can according to their own needs to assemble commands, so that you want to achieve the desired effect (some like a child to play the building blocks). In Unix, "tools" are everywhere, because UNIX itself is a toolbox, and only if you fully understand and accept the idea that you can use it better!

Well, the above is my personal experience, due to the time and level of the relationship, writing is not particularly comprehensive, is a trigger. But I also sincerely hope that it can give you some help. (T111)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.