Some suggestions for beginners of FreeBSD

Source: Internet
Author: User
As a BSDer, the most frequently transferred on the internet is UNIX-related forums. In the process of getting in touch with many new users, it was found that a considerable number of people were transferred from Windows (almost "the vast majority"), and they encountered many difficulties when learning FreeBSD, and even felt that UNIX systems were extremely difficult to use, here, I will summarize my experience for your reference.

The first problem is how to obtain it. Windows is sold everywhere, and even some Linux systems, such as RedHat and Mandrake, are sold, but FreeBSD, UNIX such as NetBSD does not seem to have been sold yet-at least in Chongqing. The best way to get BSD is through web downloads, such as FreeBSD's official site point ftp://ftp.freebsd.org, ftp://ftp.cnfug.org, or some sites dedicated to providing free software downloads, such as http://www.wormwang.net can download related systems and applications. If you have no conditions for Online downloads, you can find a friend in the same city on the forum you often go to help you engrave the disk. Generally, you will be more happy.

Second, install. To install an operating system, partitions are required. However, partitioning is a nightmare for many people ...... Partitions mean data loss or even the loss of the entire partition table. In particular, the partition of BSD is a headache for many people, because BSD inherits the traditional disk management concept of UNIX, and PC has not yet appeared. Therefore, in the traditional disk management mechanism of BSD, there is no "Partition" concept in PC. It divides disks into Slice for Management (if you are interested in FreeBSD, you can refer to Wang Bo's FreeBSD or FreeBSD Handbook). The concept of Slice is introduced because it is closely related to the concept of "mount point. Since there is no partition in UNIX, BSD cannot understand the concept of "extended partition", so it must be installed in the primary partition. Then divide Slice. In addition, Slice is transparent to programs and users in the file system, not as visible as partitions. After a Server Load balancer instance is assigned, it must be assigned a Mount Point, which is equivalent to assigning a drive letter to a partition in Windows. Only the Slice with a mount point assigned can be mounted and available by the operating system. The composition of UNIX file systems is completely different from that of Windows, which will be detailed later. Of course, to be compatible with other operating systems, FreeBSD installer also provides fdisks that support the concept of "Partitioning. But FreeBSD must be installed in the primary partition (but unlike Linux, a separate swap partition is required, and FreeBSD's swap is only a Slice of its partition ), therefore, FreeBSD does not support operations on logical partitions. It only displays extended partitions and treats them as a primary partition. You must be very careful with this. After the partition is complete, start the installation. This step has nothing special. The only special feature is that FreeBSD can not install the GUI (Graphic User Interface, graphical User Interface ).

After the file replication process is complete, the configuration is started, but the configuration process is not difficult. You can see the prompt to know how to do it. Next, configure X-Window (note! Is X-Window, without X-Windows, which is an easy mistake for many Windows users.) X-Window can now recognize most hardware, especially mainstream hardware, therefore, too much intervention is not required. After configuring X-Window, you must select Window Maker or Desktop Environment. Otherwise, you can only use the default Simple twm interface. It should be noted that UNIX systems are character-oriented, and X-Window is a program running on UNIX systems, which is also the most common GUI for UNIX systems. Input startx in the character interface to start "XFree86", which is the most popular branch of "X" and "X-Window. However, the unconfigured X is very ugly (it is no exaggeration to say that Windows 95 is better than it ). However, you only see the original face of X. It is well dressed and can even match the GUI of Mac OS X! X's design philosophy is similar to the UNIX Design Philosophy: "Tools, no policy! (Tools, not policies !)" These things do not specify what end users do, but provide tools for users to decide what they do. X does not specify what the GUI it provides looks like. Instead, it submits the task to another program, which is "Window Manager )". There are many such programs, such as AfterStep, Blackbox, Enlightenment, ctwm, ftwm, sawfish, and WindowMaker (note the difference between them and Window Maker. They look very different, some look like Mac OS, some look like landscape paintings, some look like something in science fiction, and even some look like Microsoft Windows! Another concept is "Desk Environment", which is actually a collection of Window Manager and application software. The most famous representatives are KDE and GNOME. We recommend that new users use KDE or GNOME because they are easy to configure and can help you learn FreeBSD in a shorter period of time, rather than being intimidated by complicated settings. Of course, after getting familiar with the system and X, it is also a good idea to try a window manager of different styles! Pai_^

After the installation is complete, you can restart the machine to enter the system. Remember one thing (very important): UNIX systems do not display the password back (that is, when you enter the password, you cannot see the asterisks in Windows ), at least in the character interface. Don't mistakenly think it's a problem with the keyboard! ^_^ This is for security reasons, because the ECHO will expose the length of the password, which is very insecure. After entering the system, we must understand its file system before it can be operated. As mentioned earlier, Slice is transparent to users. You cannot see the familiar C:, D:, E: in FreeBSD, but a lot of files and directories. UNIX systems use an inverted tree directory structure. By loading partitions or Slice through Mount Points, users cannot feel their existence. In the FreeBSD system, the root directory (/) is the vertex of the directory tree, which is/dev (the directory where the device file is located),/etc (the directory where the configuration file is located ), /home (common user start directory),/root (root user start directory),/bin (Common Program directory),/sbin (System Management Program directory ), /tmp (directory where temporary files are located),/mnt (directory where temporary mount points are located) and other level-2 directories. There are many small directories under them, so that the level-1 directory can be derived ...... You can enter ls to browse the Directory, which is equivalent to entering dir/w in DOS or in the cmd window of Win2000/XP/2003. For more information about the file, enter ls-l. In addition, ls does not have paging display parameters similar to dir, but you can achieve the same goal through ls | more or ls | less. After browsing the file systems of UNIX systems, you can find that their file systems are unified (with only one root directory ), complete (not divided into parallel "partitions" similar to C:, D:, E: Because of Slice or partition "), complex tree structure (each directory can have N multiple sub-directories and files.

In addition, the question of loading is raised separately. Traditional UNIX management methods do not automatically load any file system except its own file system for security considerations-even if it can recognize them, especially CDs and floppy disks. FreeBSD also inherits this management method. Therefore, any file system except the file system where FreeBSD is located usually needs to be manually loaded. You may think this is troublesome, but it is safer. The command for loading is mount. As for usage, I will not talk much about it. It should be noted that UNIX systems manage any other partitions in a traditional way. Therefore, in FreeBSD, they are/dev/ad0s1,/dev/ad0s2, /dev/ad0s5,/dev/ad0s7, rather than C:, D:, E:, F: in Windows :. Here I will explain it. In FreeBSD, ad indicates the hard disk device (Note: FreeBSD 3. x and before using wd), 0 indicates the first primary device (that is, the primary device of the first IDE port), s is the abbreviation of Slice, 1 refers to the first primary partition, 5 is the first logical partition. In FreeBSD, The CDROM name is/dev/acd0 (the first CDROM device is 0). (pay attention to the Case sensitivity. UNIX systems are case sensitive. This is the case in all cases! Therefore,/dev/CDROM and/dev/cdrom are definitely not the same thing ). You can also add related entries to/etc/fstab to achieve automatic loading. However, do not automatically load CDROM and soft drive. Otherwise, the system will complain that it cannot be loaded at startup, or even startup error. To automatically attach a disk or CD when using it, you can use "amd (Auto Mounting Daemon)" to automatically load the Daemon. For details, see relevant materials.

Another point is that many may find that there are very few getting started books on Unix-class system commands on the market, and the most powerful part of Unix-class systems is their commands! As the Unix design philosophy says: "tools, no policy !" We can use them to do anything. Here, I would like to remind you that there is a more powerful online help system for Unix systems than Windows-"man "! If you want to know more about a command, you can find it by using the man command name. FreeBSD and some distributions of Linux can even use the man-K keyword to find command names related to an operation or topic, such as command names related to printing, you can enter man-K print. There are a large number of Unix-type system commands. It is estimated that no one can remember all the commands and their parameters (otherwise, that person is not a genius or a madman ). FreeBSD handbook is also a good reference.

Finally, let's talk about the Unix design philosophy-tools, no policy! That is, the toolbox ". Typical Unix commands, such as LS, more, less, print, and sort, only perform one or more specific jobs. Ls is the directory LIST Command, less or more is the paging display command, sort is the sorting command, and print is the print command. They seem unrelated at first-at least in DOS and Windows. However, their combination gives you the desired results. For example, you want to list directories and display them by page. The command is ls | less. Maybe it's not as convenient as DIR/P. However, what if you want to list directories and sort them by page? In Unix systems, you can simply add a sort command -- ls | sort-N | less. If you want to print the results, you can add a print to LS | sort-N | less | print. Is it convenient? ^_^ You don't need to find another program to complete this job. You only need to use the tools in your hands. Commands or programs in UNIX have their own characteristics and functions. When they are used separately, they are not powerful. Their flexibility is where they are powerful. You can combine commands as needed, in this way, you can get the desired effect (some are like building blocks when you are a child ). In UNIX, "tools" are everywhere, because Unix itself is a toolbox. Only by fully understanding and accepting such ideas can you use it better!

Well, the above is my personal experience. Due to the relationship between time and level, it is not particularly comprehensive. However, I sincerely hope it will help you. (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.