• Tidak ada hasil yang ditemukan

Introduction to Linux - Mirror UNPAD

N/A
N/A
Protected

Academic year: 2023

Membagikan "Introduction to Linux - Mirror UNPAD"

Copied!
231
0
0

Teks penuh

Why this guide?

Who should read this book?

New versions and availability

Revision History

Contributions

Feedback

Copyright information

What do you need?

Conventions used in this document

Organization of this document

It's a good idea to choose odd run times because system tasks often run at "round" times, as you can see in Section 4.4.4 in the next section. As we explained earlier in Chapter 7 (see Section 7.3.3), the X Window System has an X server that serves graphics to clients that need a display.

What is Linux?

History

  • UNIX
  • Linus and Linux
  • Current application of Linux systems

In 1969, a team of developers at Bell Labs began working on a software solution. This makes Linux the only operating system in the world that covers such a wide range of devices.

The user interface

  • Is Linux difficult?
  • Linux for non−experienced users

All the features of UNIX were added over the next few years, resulting in the mature operating system Linux has become today. Linux developers concentrated on networking and services in the beginning, and office applications have been the last barrier to be removed.

Does Linux have a future?

  • Open Source
  • Ten years of experience at your service

The Linux user community began to realize that if Linux was ever going to be a major player in the operating system market, there needed to be some serious changes in the accessibility of the system. While Linux is probably the most famous Open Source initiative, there is another project that has contributed immensely to the popularity of the Linux operating system.

Properties of Linux

  • Linux Pros
  • Linux Cons

The security model used in Linux is based on the UNIX idea of ​​security, which is known to be robust and of proven quality. After long testing periods, most Linux users conclude that Linux is not only just as good, but in many cases better and faster than traditional solutions.

Linux Flavors

  • Linux and GNU
  • GNU/Linux
  • Which distribution should I install?

Some Linux distributions are optimized for certain processors, such as Athlon CPUs, while at the same time they will work decently enough on the standard 486, 586 and 686 Intel processors. Most Linux distributions offer a set of programs for generic computers with special packages that contain optimized kernels for the x86 Intel-based CPUs.

Summary

The default installation process allows users to choose between different basic setups, such as a workstation where all packages needed for daily use and development are installed, or a server installation where different network services can be selected. Power users can install any combination of packages they want during the initial installation process.

Exercises

Partitioning: let the installer do it for you this time, we'll discuss partitions in detail in Chapter 3. The full checklist can be found at http://www.tldp.org/HOWTO/Installation−HOWTO/index.html.

Quickstart

  • Logging in, activating the user interface and logging out
    • Introduction
    • Graphical mode
    • Text mode
  • Absolute basics
    • The commands
    • General remarks
    • Using Bash features
  • Getting help
    • Be warned
    • The man pages
    • More info
  • Summary
  • Exercises
    • Connecting and disconnecting
    • Passwords
    • Directories
    • Files
    • Getting help

The name of the command and a short description used to build the man page index are given. In parentheses is the section number of the manual page where you can find this command.

About files and the file system

General overview of the Linux file system

  • Files
  • About partitioning
  • More file system layout

Links: a system for making a file or directory visible in various parts of the system's file tree. The file system tree starts at the trunk or slash, indicated by a forward slash.

Orientation in the file system

  • The path
  • Absolute and relative paths
  • The most important files and directories
  • The most important configuration files
  • The most common devices
  • The most common variable files

Red Hat uses XFree, which is reflected in the name of the main configuration file, XFree86 Config. These parts of the system can be very busy on mail servers with many users.

Manipulating files

  • Viewing file properties
  • Creating and deleting files and directories
  • Finding files
  • More ways to view file content
  • Linking files

Detailed information about the syntax and features of the mv command can be found in the Man or Info pages. Again, a description of the full find and find features can be found on the Info pages.

File security

  • Access rights: Linux's first line of defense
  • The tools

For example, asim should create files that are owned by the group web. SUID (set user ID) and SGID (set group ID): represented by the s character in the user or group permission field.

Summary

The list above contains basic commands that you will use every day, but they can do much more than the tasks discussed here.

Exercises

  • Partitions
  • Paths
  • Tour of the system
  • Manipulating files
  • File permissions

Change to /etc/rc.d | /etc/init.d | /etc/runlevels and select the directory that corresponds to your runlevel. Make sure you also copy the files and directories that are in the /etc subdirectories.

Processes

Processes inside out

  • Multi−user and multi−tasking
  • Process types
  • Process attributes
  • Displaying process information
  • Life and death of a process
  • SUID and SGID

Running a process in the background is only useful for programs that do not require user input (via the shell). Most of the time they are initialized during system startup and then wait in the background until their service is needed.

Boot process, Init and shutdown

  • Introduction
  • The boot process
  • GRUB features
  • Init
  • Init run levels
  • Shutdown

Init then proceeds to read the /etc/inittab file, which describes how the system should be configured at each runlevel and sets the default runlevel. It then runs all startup scripts (their filenames start with an S) in the appropriate run-level directory so that all services and applications start correctly.

Managing processes

  • Work for the system admin
  • How long does it take?
  • Performance
  • Load
  • Can I do anything as a user?

On any Linux system, many programs want to use the CPU(s) at the same time, even if you are the only user on the system. In case you want the process to keep running, but you also want to give the other processes on the system a chance, you can refresh the process.

Scheduling processes

  • Use that idle time!
  • The sleep command
  • The at command
  • Cron and crontab

Runs commands as the user who owns the crontab file and sends all command output to the owner. Then comes the user who should run the processes listed in the last column.

Summary

After adding a new scheduled task, the system will tell you that a new crontab has been installed. Keep in mind that execution of commands, if any, is posted to the owner of the crontab file.

Exercises

  • General
  • Booting, init etc
  • Scheduling

Up until now you have logged in after system boot and started this server manually using a script named delivery_pizza in your home directory. What do you need to do to make the service start automatically in runlevel 4 which you have defined only for this purpose.

I/O redirection

  • Simple redirections
    • What are standard input and standard output?
    • The redirection operators
  • Advanced redirection features
    • Use of file descriptors
    • Examples
  • Filters
    • More about grep
    • Filtering output
  • Summary
  • Exercises

In the following descriptions, if the file descriptor number is omitted and the first character of the redirect operator is <, the redirect refers to the standard input (file descriptor 0). Use the cut command on the output of a long directory list to show only the file permissions.

Text editors

  • Text editors
    • Why should I use an editor?
    • Which editor should I use?
  • Using the Vim editor
    • Two modes
    • Basic commands
    • The easy way
  • Linux in the office
    • History
    • Suites and programs
    • Remarks
  • Summary
  • Exercises

This will make a copy of the tutor file so you can edit it without risking damaging the original. You still have to use vi commands, but if you're stuck, you can look them up in the menus.

Home sweet /home

General good housekeeping

  • Introduction
  • Make space

Try replacing the log file with a symlink to /dev/null; if you're lucky, the program won't complain. Multiple links (different names) to the same file can also appear in the same directory.

Your text environment

  • Environment variables
  • Shell setup files
  • A typical set of setup files
  • The Bash prompt
  • Shell scripts

The script first makes a list of all the files in the current directory and puts it in the LIST variable. Options, such as the daemon option, and functions such as killproc, are defined in the file /etc/rc.d/init.d/functions.

The graphical environment

  • Introduction
  • The X Window System
  • X server configuration

In the startup case, the server program is started as a daemon, and a process ID and a lock are assigned. In the stop case, the server process is tracked down and stopped, and the lock and PID are removed.

Region specific settings

  • Keyboard setup
  • Fonts
  • Date and time zone
  • Language
  • Country−specific Information

You can manually run ntpdate to set the time, provided you can reach the time server. Most desktop managers include tools for setting the system time, provided you have access to a system administrator account.

Installing new software

  • General
  • Package formats
  • Automating package management and updates
  • Upgrading your kernel
  • Installing extra packages from the installation CDs

This is basically done in the same way as installing packages manually, except you need to add the file system from the CD to your machine's file system to make it accessible. To get the CD out of the drive after you have finished using it, the file system on the CD should be unused.

Summary

After mounting the CD, you can change directories, usually to the mount point /mnt/cdrom, where you can access the contents of the CD-ROM. If in doubt, use the lsof utility to trace the process(es) still using the CD resource.

Exercises

  • Shell environment
  • Graphical environment

Enable so-called sloppy focus – this is when a window is activated by simply hovering over it with the mouse, so you don't have to click on the window to use it.

Printers and printing

  • Printing files
    • Command line printing
    • Formatting
  • The server side
    • General
    • Graphical printer configuration
    • Buying a printer for Linux
  • Print problems
    • Wrong file
    • My print hasn't come out
  • Summary
  • Exercises

More advanced usage instructions can be found in the manual pages of the various commands. More information can be found in the VNC client man pages (man vncviewer) or on the VNC website.

Fundamental Backup Techniques

Introduction

  • Preparing your data

If files are modified more recently than date, they will be included in the backup. We only explain about tar here because it is a very popular tool for distributing archives.

Moving your data to a backup device

  • Making a copy on a floppy disk
  • Making a copy with a CD−writer
  • Backups on/from jazz drives, USB devices and such
  • Backing up data using a tape device
  • Tools from your distribution

To do this, use the mkisofs command in the folder containing the files you want to back up. One of the popular ones is xcdroast, which is available for free from the X−CD−Roast website and is present on most systems and in the GNU directory.

Using rsync

  • Introduction
  • An example: rsync to a USB storage device

Encryption

  • General remarks
  • Generate a key
  • About your key
  • Encrypt data
  • Decrypting files

You can send the public key to correspondents, who can use it to encrypt data for you, which you decrypt with your private key. You can send your key ID and name to a key server so that others can obtain this information about you and use it to encrypt data for you.

Summary

The data will move across the screen, but the encrypted copy will remain on disk. So for file formats other than plain text, you'll want to save the decrypted data so you can view it with the appropriate program.

Exercises

Networking

Networking Overview

  • The OSI Model
  • Some popular networking protocols

Each layer can only use the functionality of the underlying layer; each layer can only export functionality to the layer above. Netatalk is a kernel-level implementation of the AppleTalk Protocol Suite originally for BSD-derived systems.

Network configuration and information

  • Configuration of network interfaces
  • Network configuration files
  • Network configuration commands
  • Network interface names
  • Checking the host configuration with netstat
  • Other hosts

Now the card can be configured either using the graphical or the command line interface. Similar information can be displayed using the dig command, which provides additional information about how records are stored in the nameserver.

Internet/Intranet applications

  • Server types
  • Mail
  • Web
  • File Transfer Protocol
  • Chatting and conferencing
  • News services
  • The Domain Name System
  • DHCP
  • Authentication services

More information can be found on the pam-man pages or on the Linux−PAM project website. More information can be found in the LDAP Linux HOWTO, which discusses installing, configuring, running, and maintaining an LDAP server on Linux.

Remote execution of applications

  • Introduction
  • Rsh, rlogin and telnet
  • The X Window System
  • The SSH suite
  • VNC
  • The rdesktop protocol
  • Cygwin

This is all done automatically, so when you type the name of a graphics application, it will be displayed on your local machine and not on the remote host. This procedure assumes that you have a running X server on the client where you want to display the application from the remote host.

Security

  • Introduction
  • Services
  • Update regularly
  • Firewalls and access policies
  • Intrusion detection
  • More tips
  • Have I been hacked?
  • Recovering from intrusion

More information can be found in the TCP wrapper documentation files in /usr/share/doc/tcp_wrappers[−/]. In the latter case, it is too late to prevent damage, but at least we have early knowledge of a problem.

Summary

Try to find out as much as possible about how your security was breached. Re-examine the system: block unnecessary services, check firewall rules and other access policies.

Exercises

  • General networking
  • Remote connections
  • Security

If your card is not automatically detected, you may be presented with a list of sound cards and/or sound card properties to choose from. In addition, distributions usually offer their own tools for configuring the sound card; these tools may even combine old and new ways of dealing with audio devices.

Sound and Video

Audio Basics

  • Installation
  • Drivers and Architecture

Most likely, the audio drivers are already installed on your system and the configuration was done during the installation. If you are using a dual-boot system with MS Windows, you can also find this information in the Windows Control Panel.

Sound and video playing

  • CD playing and copying
  • Playing music files
  • Recording

Video playing, streams and television watching

Internet Telephony

  • What is it?
  • What do you need?

Summary

Exercises

Useful Books

  • General Linux
  • Editors
  • Shells
  • X Window
  • Networking

Useful sites

  • General information
  • Architecture Specific References
  • Distributions
  • Software

Common features

Differing features

PREAMBLE

APPLICABILITY AND DEFINITIONS

VERBATIM COPYING

COPYING IN QUANTITY

MODIFICATIONS

COMBINING DOCUMENTS

COLLECTIONS OF DOCUMENTS

AGGREGATION WITH INDEPENDENT WORKS

TRANSLATION

TERMINATION

FUTURE REVISIONS OF THIS LICENSE

ADDENDUM: How to use this License for your documents

  • 215
  • 222
  • 222

Referensi

Dokumen terkait