没有合适的资源?快使用搜索试试~ 我知道了~
首页Linux入门与安装指南:从桌面环境到基础命令
Linux入门与安装指南:从桌面环境到基础命令
5星 · 超过95%的资源 需积分: 10 11 下载量 141 浏览量
更新于2024-07-30
收藏 13.68MB PDF 举报
"《Running Linux》第五版是一本经典的入门级Linux教程,专为对Linux系统感兴趣的新手设计。本书结构清晰,内容涵盖了Linux的基础知识、安装过程、桌面环境的使用以及基本的Unix命令和概念。以下是部分内容的详细解析:
1. 简介与目标读者:
- 作者首先介绍这本书的目的,旨在帮助读者了解Linux的基本特性和其广泛的应用领域。书中提到,Linux不仅在企业服务器上被广泛应用,也在个人电脑和移动设备上找到了新角色。
- 章节1.2介绍了Linux的用户群体,包括开发者、科研人员、教育机构和寻求替代Windows操作系统的家庭用户。
2. 安装与预处理:
- 第2章着重于Linux的不同发行版,如Ubuntu、Red Hat、Debian等,让读者了解选择合适的发行版的重要性。
- 2.2节指导读者准备安装,包括硬件需求、分区规划等,确保读者有充分的准备。
- 安装完成后,2.3节会介绍一些基本的启动选项和设置,以及遇到问题时的解决策略。
3. 图形界面与桌面环境:
- 在第三部分,作者讨论了使用图形桌面环境(如KDE和GNOME)的理由,强调它们如何提高用户的易用性。
- KDE和GNOME分别在3.2和3.4章节详细介绍,包括各自的特点、应用程序和工作流程。
4. 基础Unix命令与概念:
- 第四章深入浅出地教授基本的Unix命令,如登录、设置密码、虚拟控制台操作等,这些都是Linux系统的核心组成部分。
- 4.4部分列举了常用的命令,如目录操作、文件管理、文本编辑器等,让读者逐步掌握基础操作。
- 4.5章节讲解了不同类型的shell(如bash),以及快捷键的使用,以提升效率。
通过这些章节,读者可以从零开始学习Linux,了解其系统架构,掌握基本操作,并熟悉两种主流的桌面环境。《Running Linux》不仅是初学者的实用指南,也是希望提高Linux技能的用户不可或缺的参考书。无论你是想切换操作系统,还是想要扩展自己的技术栈,这本书都将为你提供坚实的基础。"
meaning that executables share common library code in a single library file found on disk. This allows
executable files to occupy much less space on disk. This also means that a single copy of the library code is
held in memory at one time, thus reducing overall memory usage. There are also statically linked libraries for
those who wish to maintain "complete" executables without the need for shared libraries to be in place.
Because Linux shared libraries are dynamically linked at runtime, programmers can replace modules of the
libraries with their own routines.
In order to make the best use of the system's memory, Linux implements so-called virtual memory with disk
paging. That is, a certain amount of swap space
[*]
can be allocated on disk. When applications require more
physical memory than is actually installed in the machine, it will swap inactive pages of memory out to disk.
(A page is simply the unit of memory allocation used by the operating system; on most architectures, it's
equivalent to 4 KB.) When those pages are accessed again, they will be read from disk back into main
memory. This feature allows the system to run larger applications and support more users at once. Of course,
swap is no substitute for physical RAM; it's much slower to read pages from disk than from memory.
[*]
If you are a real OS geek, you will note that swap space is inappropriately named: entire
processes are not swapped, but rather individual pages of memory are paged out. Although in
some cases entire processes will be swapped out, this is not generally the case. The term
"swap space" originates from the early days of Linux and should technically be called "paging
space."
The Linux kernel keeps portions of recently accessed files in memory, to avoid accessing the (relatively slow)
disk any more than necessary. The kernel uses all the free memory in the system for caching disk accesses, so
when the system is lightly loaded a large number of files can be accessed rapidly from memory. When user
applications require a greater amount of physical memory, the size of the disk cache is reduced. In this way
physical memory is never left unused.
To facilitate debugging , the Linux kernel generates a core dump of a program that performs an illegal
operation, such as accessing an invalid memory location. The core dump, which appears as a file called core
in the directory that the program was running, allows the programmer to determine the cause of the crash. We
talk about the use of core dumps for debugging in the section "Examining a Core File" in Chapter 21.
1.3.3. Commands and Shells
The most important utility to many users is the shell. The shell is a program that reads and executes
commands from the user. In addition, many shells provide features such as job control (allowing the user to
manage several running processes at oncenot as Orwellian as it sounds), input and output redirection, and a
command language for writing shell scripts. A shell script is a file containing a program in the shell command
language, analogous to a "batch file" under Windows.
Many types of shells are available for Linux. The most important difference between shells is the command
language. For example, the C shell (csh) uses a command language somewhat like the C programming
language. The classic Bourne shell uses a different command language. One's choice of a shell is often based
on the command language it provides. The shell that you use defines, to some extent, your working
environment under Linux.
No matter what Unix shell you're accustomed to, some version of it has probably been ported to Linux. The
most popular shell is the GNU Bourne Again Shell (bash), a Bourne shell variant. bash includes many
advanced features, such as job control, command history, command and filename completion, an Emacs-like
(or optionally, a vi-like) interface for editing the command line, and powerful extensions to the standard
Bourne shell language. Another popular shell is tcsh, a version of the C shell with advanced functionality
8 Part I: Enjoying and Being Productive on Linux
8 Part I: Enjoying and Being Productive on Linux
similar to that found in bash. Recently, zsh, with very advanced completion facilities, has found a lot of
followers. Other shells include the Korn shell (ksh), BSD's ash, and rc, the Plan 9 shell.
What's so important about these basic utilities? Linux gives you the unique opportunity to tailor a custom
system to your needs. For example, if you're the only person who uses your system, and you prefer to use the
vi editor and the bash shell exclusively, there's no reason to install other editors or shells. The "do it yourself"
attitude is prevalent among Linux hackers and users.
1.3.4. Text Processing and Word Processing
Almost every computer user has a need for some kind of document preparation system. (In fact, one of the
authors has almost entirely forgotten how to write with pen and paper.) In the PC world, word processing is
the norm: it involves editing and manipulating text (often in a "what you see is what you get" [WYSIWYG]
environment) and producing printed copies of the text, complete with figures, tables, and other garnishes.
As you will see in this book, Linux supports attractive and full-featured WYSIWYG tools. In Chapter 8 we'll
discuss OpenOffice (a free version of a propriety product, StarOffice, released by Sun Microsystems when it
bought the suite's manufacturer), and KOffice, both of which are tightly integrated suites that support word
processing, spreadsheets, and other common office tasks. These don't support all the features of Microsoft
Office, but by the same token, they have some valuable features that Microsoft Office lacks. If you want to
run Microsoft Office, you can do so through Wine, which we mention later.
There is a role for other ways to create documents, though. The system configuration files you need to edit on
Linux from time to time, as well as programming for application development, require the use of simple text
processing. The most popular tools for creating such documents are vi and Emacs, described in detail in
Chapter 19.
Text processing can also be used with separate formatting tools to create very readable and attractive
documents. With a text processing system, the author enters text using a "typesetting language" that describes
how the text should be formatted. Once the source text (in the typesetting language) is complete, a user
formats the text with a separate program, which converts the source to a format suitable for printing. This is
somewhat analogous to programming in a language such as C, and "compiling" the document into a printable
form.
The most famous text formatting language is HTML, the markup language used by virtually every page on the
World Wide Web. Another popular text processing language is DocBook XML, a kind of industry-standard
set of tags for marking up technical documentation, which is also used by the Linux Documentation Project
(to be discussed later in this chapter).
We'll look at several text formatting systems in Chapter 20, Text Processing: T
E
X (developed by Donald
Knuth of computer science fame) and its dialect LAT
E
X, groff, the GNU version of the classic troff text
formatter originally developed by Bell Labs); Texinfo (an extension to T
E
X used for software documentation
by the Free Software Foundation); and Docbook.
1.3.5. Commercial Applications
In addition to the more than fifteen hundred Linux applications maintained by Linux distributors such as
Debian, a groundswell of support exists from commercial application developers for Linux. These products
include office productivity suites, word processors, scientific applications, network administration utilities,
Part I: Enjoying and Being Productive on Linux 9
Part I: Enjoying and Being Productive on Linux 9
ERP packages such as Oracle Financials and SAP, and large-scale database engines. Linux has become a
major force in the commercial software market, so you may be surprised to find how many popular
commercial applications are available for Linux. We can't possibly discuss all of them here, so we'll only
touch on the most popular applications and briefly mention some of the others.
Oracle, IBM, Informix, Sybase, and Interbase have released commercial database engines for Linux. Many of
the Linux database products have demonstrated better performance than their counterparts running on
Windows servers.
One very popular database for Linux is MySQL , a free and easy-to-use database engine. Because MySQL is
easy to install, configure, and use, it has rapidly become the database engine of choice for many applications
that can forego the complexity of the various proprietary engines. Furthermore, even though it's free software,
MySQL is supported professionally by the company that developed it, MySQL AB. We describe the basic use
of MySQL in Chapter 25.
MySQL does not include some of the more advanced features of the proprietary databases, however. Some
database users prefer the open source database PostgresSQL, and Red Hat features it in some of its products.
On the other hand, MySQL is catching up really quickly; the next version will contain support for distributed
databases, for example.
A wide range of enterprise applications is available for Linux in addition to databases. Linux is one of the
most popular platforms for Internet service hosting, so it is appropriate that high-end platforms for scalable
web sites, including JBoss, BEA WebLogic, and IBM WebSphere, have been released for Linux.
Commercial, high-performance Java Virtual Machines and other software are available from Sun, IBM, and
other vendors. IBM has released the popular Lotus Domino messaging and web application server, as well as
the WebSphere MQ (formerly MQSeries) messaging platform.
Scientists, engineers, and mathematicians will find that a range of popular commercial products are available
for Linux, such as Maple, Mathematica, MATLAB, and Simulink. Other commercial applications for Linux
include high-end CAD systems, network management tools, firewalls, and software development
environments.
1.3.6. Programming Languages and Utilities
Linux provides a complete Unix programming environment, including all the standard libraries, programming
tools, compilers, and debuggers that you would expect to find on other Unix systems. The most commonly
used compiler on Linux is the GNU's Compiler Collection, or gcc. gcc is capable of compiling C, C++,
Objective C (another object-oriented dialect of C), Chill (a programming language mainly used for
telecommunications), FORTRAN, and Java. Within the Unix software development world, applications and
systems programming is usually done in C or C++, and gcc is one of the best C/C++ compilers around,
supporting many advanced features and optimizations.
Java is an object-oriented programming language and runtime environment that supports a diverse range of
applications such as web page applets, Internet-based distributed systems, database connectivity, and more.
Java is fully supported under Linux. Several vendors and independent projects have released ports of the Java
Development Kit for Linux, including Sun, IBM, and the Blackdown Project (which did one of the first ports
of Java for Linux). Programs written for Java can be run on any system (regardless of CPU architecture or
operating system) that supports the Java Virtual Machine. A number of Java "just in time" (or JIT ) compilers
are available, and the IBM and Sun Java Development Kits (JDKs) for Linux come bundled with
high-performance JIT compilers that perform as well as those found on Windows or other Unix systems.
10 Part I: Enjoying and Being Productive on Linux
10 Part I: Enjoying and Being Productive on Linux
Some of the most popular and interesting tools associated with Java are open source. These include Eclipse,
an integrated development environment (IDE) that is extendable to almost anything through plugins; JBoss,
an implementation of Java 2 Enterprise Edition (J2EE) that has actually gone through the expense of
becoming certified after a complaint by Sun Microsystems; and Gluecode, another application platform
company bought by IBM in May 2005.
gcc is also capable of compiling Java programs directly to executables, and includes limited support for the
standard JDK libraries.
Besides C, C++, and Java, many other compiled and interpreted programming languages have been ported to
Linux, such as Smalltalk, FORTRAN, Pascal, LISP, Scheme, and Ada. In addition, various assemblers for
writing machine code are available. An important open source project sponsored by Novell has developed an
environment called Mono that provides support for Microsoft's .NET environment on Unix and Linux
systems. Perhaps the most important class of programming languages for Linux is the many scripting
languages, including Perl (the script language to end all script languages), Python (the first scripting language
to be designed as object-oriented from the ground up), and Ruby (a fiercely object-oriented scripting language
that has been heralded as very good for rapid application development ).
Linux systems make use of the advanced gdb debugger, which allows you to step through a program to find
bugs or examine the cause for a crash using a core dump. gprof, a profiling utility, will give you performance
statistics for your program, letting you know where your program is spending most of its time. The Emacs and
vim text editors provide interactive editing and compilation environments for various programming
languages. Other tools that are available for Linux include the GNU make build utility, used to manage
compilation of large applications , as well as source-code control systems such as CVS and Subversion.
Linux is an ideal system for developing Unix applications. It provides a modern programming environment
with all the bells and whistles, and many professional Unix programmers claim that Linux is their favorite
operating system for development and debugging. Computer science students can use Linux to learn Unix
programming and to explore other aspects of the system, such as kernel architecture. With Linux, not only do
you have access to the complete set of libraries and programming utilities, but you also have the complete
kernel and library source code at your fingertips. Chapter 20 of this book is devoted to the programming
languages and tools available for Linux.
1.3.7. The X Window System
The X Window System is the standard GUI for Unix systems. It was originally developed at MIT in the 1980s
with the goal of allowing applications to run across a range of Unix workstations from different vendors. X is
a powerful graphical environment supporting many applications. Many X-specific applications have been
written, such as games, graphics utilities, programming and documentation tools, and so on.
Unlike Microsoft Windows, the X Window System has built-in support for networked applications: for
example, you can run an X application on a server machine and have its windows display on your desktop,
over the network. Also, X is extremely customizable: you can easily tailor just about any aspect of the system
to your liking. You can adjust the fonts, colors, window decorations, and icons for your personal taste. You
can go so far as to configure keyboard macros to run new applications at a keystroke. It's even possible for X
to emulate the Windows and Macintosh desktop environments , if you want to keep a familiar interface.
The X Window System is freely distributable. However, many commercial vendors have distributed
proprietary enhancements to the original X software. The version of X available for Linux is known as X.org ,
which is a port of X11R6 (X Window System Version 11, Release 6) made freely distributable for PC-based
Unix systems, such as Linux.
[*]
X.org supports a wide range of video hardware, including standard VGA and
Part I: Enjoying and Being Productive on Linux 11
Part I: Enjoying and Being Productive on Linux 11
many accelerated video adapters. X.org is a complete distribution of the X software, containing the X server
itself, many applications and utilities, programming libraries, and documentation. It comes bundled with
nearly every Linux distribution.
[*]
X.org actually derives from another PC-based version of the X Window System, XFree86.
Political quarrels that we do not want to go into here have led to a split into XFree86 and
X.org; most Linux distributions these days ship the X.org version. This is not relevant for
you, though, unless you plan to help with the continued development of the X Window
System.
The look and feel of the X interface are controlled to a large extent by the window manager. This friendly
program is in charge of the placement of windows, the user interface for resizing, iconifying, and moving
windows, the appearance of window frames, and so on.
The X distribution and the major Linux distributions also contain programming libraries and include files for
those wily programmers who wish to develop X applications. All the standard fonts, bitmaps, manual pages,
and documentation are included.
Chapter 16 discusses how to install and use the X Window System on your Linux machine.
1.3.8. KDE and GNOME
Although the X Window System provides a flexible windowing system, many users want a complete desktop
environment, with a customizable look and feel for all windows and widgets (such as buttons and scrollbars),
a simplified user interface, and advanced features such as the ability to "drag and drop" data from one
application to another. The KDE and GNOME projects are separate efforts that are striving to provide such an
advanced desktop environment for Linux. By building up a powerful suite of development tools, libraries, and
applications that are integrated into the desktop environment, KDE and GNOME aim to usher in the next era
of Linux desktop computing. In the spirit of the open source community, these projects work together to
provide complete interoperability so that applications originating in one environment will work on the other.
Both systems provide a rich GUI, window manager, utilities, and applications that rival or exceed the features
of systems such as the Windows XP desktop.
With KDE and GNOME, even casual users and beginners will feel right at home with Linux. Most
distributions automatically configure one of these desktop environments during installation, making it
unnecessary to ever touch the text-only console interface.
Both KDE and GNOME aim to make the Linux environment more user-friendly, and each has its fans and
partisans. We discuss both in Chapter 3. As with X, both KDE and GNOME provide open source libraries that
let you write programs conforming to their behavior and their look and feel.
1.3.9. Networking
Linux boasts one of the most powerful and robust networking systems in the worldmore and more people are
finding that Linux makes an excellent choice as a network server. Linux supports the TCP/IP networking
protocol suite that drives the entire Internet, as well as many other protocols, including IPv6 (a new version of
the IP protocol for the next-generation Internet), and UUCP (used for communication between Unix machines
over serial lines). With Linux, you can communicate with any computer on the Internet, using Ethernet
12 Part I: Enjoying and Being Productive on Linux
12 Part I: Enjoying and Being Productive on Linux
剩余885页未读,继续阅读
2014-08-07 上传
2014-10-29 上传
2007-07-07 上传
2019-09-23 上传
hust_sj
- 粉丝: 9
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C语言数组操作:高度检查器编程实践
- 基于Swift开发的嘉定单车LBS iOS应用项目解析
- 钗头凤声乐表演的二度创作分析报告
- 分布式数据库特训营全套教程资料
- JavaScript开发者Robert Bindar的博客平台
- MATLAB投影寻踪代码教程及文件解压缩指南
- HTML5拖放实现的RPSLS游戏教程
- HT://Dig引擎接口,Ampoliros开源模块应用
- 全面探测服务器性能与PHP环境的iprober PHP探针v0.024
- 新版提醒应用v2:基于MongoDB的数据存储
- 《我的世界》东方大陆1.12.2材质包深度体验
- Hypercore Promisifier: JavaScript中的回调转换为Promise包装器
- 探索开源项目Artifice:Slyme脚本与技巧游戏
- Matlab机器人学习代码解析与笔记分享
- 查尔默斯大学计算物理作业HP2解析
- GitHub问题管理新工具:GIRA-crx插件介绍
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功