From DOS/Windows to Linux HOWTO <author>By Guido Gonzato, <url url="mailto:REMOVE_MEguido@ibogeo.df.unibo.it">(Remove ``REMOVE_ME'') <date>v1.3.2, 22 February 1999 <trans>宮野浩史, <url url="mailto:hmiyano@webjapan.com"> <tdate>v1.3.2, 28 April 2000 <abstract> <!-- This HOWTO is dedicated to all the (soon to be former?) DOS and Windows users who have decided to switch to Linux, the free UNIX clone. The purpose of this document is to help the reader translate his or her knowledge of DOS and Windows into the Linux environment, as well as providing hints on exchanging files and resources between the two OSes. --> この HOWTO は 全ての Linux (フリーの UNIX クローン) に乗り換えようと 決心した (もうすぐ過去のものになる?) DOS と Windows ユーザに捧げます。 このドキュメントの目的は読者の DOS や Windows の知識を Linux での環境 に訳す手伝いをすることと、二つの OS 間でのファイルやリソースの交換に ついてのヒントを提供することです。 </abstract> <toc> <sect> <!-- Introduction --> 序章 <p> <sect1> <!-- Is Linux Right for You? --> Linux はあなたに合ってますか? <p> <!-- You want to switch from the DOS world (this definition includes Windows) to Linux? Good idea: Linux is technically superior to DOS, Windows 9x and even Windows NT. But beware: it might not be useful for you. These are the main differences between DOS/Windows and Linux: --> DOS の世界 (Windows を含む) から Linux へと乗り換えたいんですか? 名案です。Linux は DOS や Windows 9x、さらに Windows NT よりも技術的に 優れています。でも注意してください。Linux はあなたの役に立たないかもし れません。以下は DOS/Windows と Linux の基本的な違いです。 <itemize> <item> <!-- Windows runs Microsoft Office and lots of games; is perceived to be easy to install and configure; is notoriously unstable; performs poorly; crashes are frequent. --> Windows 上では Microsoft Office や多数のゲームが使えますし、簡単なイン ストールや設定が可能です。しかし不安定でパフォーマンスも悪いし、よくク ラッシュします。 <item> <!-- Linux runs StarOffice, scores of technical software and fewer games; can be difficult to install and configure; is rock solid; performs impeccably; crashes are extremely rare. --> Linux 上では StarOffice、多数の専門ソフトウェア、そして少なめのゲーム が動きます。インストールや設定は難しくもありますが、岩のように堅固で欠 点のないパフォーマンスで、クラッシュすることはほとんどありません。 </itemize> <!-- It's up to you to decide what you need. Furthermore, Linux gives you power, but it takes some time to learn how to harness it. Thus, if mostly need commercial sw, or if you don't feel like learning new commands and concepts, you had better look elsewhere. Be aware that many newcomers give up because of initial difficulties. --> あなたにとって何が必要なのかはあなた自身が決めることです。付け加えてお くと、Linux はあなたにパワーを与えてくれますが、うまく使えるようになる まではある程度の時間が必要です。だから、商用のソフトが必要な場合がほと んどだったり、新しいコマンドや概念を覚えたりするのが嫌だったりしたら違 うものを探してください。最初でつまずいて諦めてしまう新顔さんたちがたく さんいることを心に置いておいてください。 <!-- Work is underway to make Linux simpler to use, but <em/don't expect to be proficient with it unless you read a lot of documentation and use it at least for a few months/. Linux won't give you instant results. In spite of these warnings, I'm 100% confident that if you are the right user type you'll find in Linux your computer Nirvana. By the way, Linux + DOS/Win can coexist happily on the same machine. --> Linux をもっと簡単に使えるようにするための作業は進行中ですが、<em/ドキュ メントをたくさん読んで少なくとも Linux を数ヵ月使わないかぎり、熟練した ユーザになることを期待しないでください/。Linux はすぐには結果をくれません。 しかしながら、もしもあなたが Linux に合っているタイプの人なら必ず Linux に極楽を見付けることを私が保証します。ちなみに Linux と DOS/Windows は 同じマシン上で幸せに同居できます。 <!-- Prerequisites for this howto: I'll assume that --> この HOWTO を読むうえでの条件: <itemize> <item> <!-- you know the basic DOS commands and concepts; --> 基本的な DOS コマンドとその概念を知っていること <item> <!-- Linux, possibly with X Window System (X11 for short), is properly installed on your PC; --> Linux と、できれば X Window System ( X11 と略す) がきちんとあなたの PC にインストールされていること <item> <!-- your shell (the equivalent of <tt/COMMAND.COM/) is <tt/bash/. --> シェル (<tt/COMMAND.COM/ に相当) は <tt/bash/ を使用していること </itemize> <!-- Unless specified, all information in this work is aimed at bad ol' DOS. There is information about Windows here and there, but bear in mind that Windows and Linux are totally different, unlike DOS that is sort of a UNIX poor relation. --> 特に記載がない限り、文章内の全ての情報は古き悪き DOS を対象としてい ます。文章内には Windows の情報がちらほらとありますが、Windows と Linux は、DOS がお粗末ながらもどことなく UNIX と似ているのと違い、全く 異なるものだということを心に止めておいてください。 <!-- Please also note that this work is neither a complete primer nor a configuration guide! --> 注意! このドキュメントは完全な入門書でも設定ガイドでもありません。 <!-- The latest version of this document is available in several formats on --> このドキュメントの最新版は以下のサイトからいくつかの形式で入手可能です <url url="ftp://sunsite.unc.edu:/pub/Linux/docs/howto">(日本語訳: <url url="http://www.linux.or.jp/JF">)。 <sect1> <!-- It Is. Tell Me More --> もっと教えてください <p> <!-- You installed Linux and the programs you needed on the PC. You gave yourself an account (if not, type <tt/adduser yourname/ <em/now!/) and Linux is running. You've just entered your name and password, and now you are looking at the screen thinking: ``Well, now what?'' --> あなたは Linux と必要なプログラムを PC にインストールしました。ユーザ アカウントも自分用のものを作成し (まだやってなかったら<em/今すぐ/ <tt/ adduser あなたの名前/ すること!)、Linux が起動しています。ユーザネー ムとパスワードをタイプし、スクリーンを見つめて思っています。「ふむ、 何したらいいんだろ?」 <!-- Now, don't despair. You're almost ready to do the same things you used to do with DOS/Win, and many more. If you were running DOS/Win instead of Linux, you would be doing some of the following tasks: --> 絶望しないでください。あなたはこれから DOS/Win で行ってきたようなこと や、そのほか色々なことをする準備がほとんどできたのです。もしあなたが Linux ではなく DOS/Win を起動していたなら、以下のようなことをしている ことになります。 <itemize> <item> <!-- running programs and creating, copying, viewing, deleting, printing, renaming files; --> プログラムの起動、ファイルの作成・コピー・閲覧・削除・印刷・ リネーム <item> <!-- CD'ing, MD'ing, RD'ing, and DIR'ring your directories; --> ディレクトリの CD、MD、RD、そして DIR を行う <item> <!-- formatting floppies and copying files from/to them; --> フロッピーのフォーマットとフロッピーへのコピーやその逆 <item> <!-- tailoring the system; --> システムを自分好みに仕立てる <item> <!--surfing the Internet; --> ネットサーフィンする <item> <!-- writing .BAT files and programs in your favourite language;--> .BAT ファイルやプログラムを好きな言語で記述する <item> <!-- the remaining 1%.--> 残りの 1% </itemize> <!-- You'll be glad to know that these tasks can be accomplished under Linux in a fashion similar to DOS. Under DOS, the average user uses very few of the 100+ commands available: the same, up to a point, applies to Linux. --> あなたはこれらの仕事が、DOS 上で行うのと似た感じで Linux 上でもできること を知って喜ぶでしょう。DOS 上で普通のユーザは、100 余りあるコマンドの中でも 少ししか使いません。Linux でもある程度はそれと同じことが言えます。 <sect2> <!--Introductory Concepts--> イントロダクション <p> <!-- The best way to learn something new is to get your feet wet. You are strongly encouraged to experiment and play with Linux: unless you login as ``root'', you can't damage the system that way. A few points: --> 新しいものを覚えるのに一番よい方法はとにかく試してみることです。 ぜひ Linux で実験したり、遊んだりしてみてください。 root でログイン しない限り (実験したり遊んだりしても) システムにダメージを与える ことはありませんから。 <!--A few points;--> 要点 <itemize> <item> <!-- first of all, how to quit Linux safely. If you see a text mode screen, press <CTRL-ALT-DEL>, wait for the system to reboot, then switch off the PC. If you are working under X Window System, press <CTRL-ALT-BACKSPACE> first, then <CTRL-ALT-DEL>. <em/Never/ switch off or reset the PC directly: this could damage the file system; --> まず始めに、どうやって安全に Linux をシャットダウンするか。もしテキス トモードの画面が見えている状態なら <CTRL-ALT-DEL> を押しシステム がリブートするのを待ち、それから PC のスイッチを切ります。もしも X Window System 上にいる場合は <CTRL-ALT-BACKSPACE> してから <CTRL-ALT-DEL> します。<em/絶対に/いきなり PC のスイッチを切った り、リセットしたりしないください。ファイルシステムにダメージを与える可 能性があります。 <item> <!-- unlike DOS or Windows, Linux has built-in security mechanisms. Files and directories have permissions associated to them; as a result, some cannot be accessed by the normal user; (see Section <ref id="Permissions" name="Permissions and Ownership">). DOS and Windows, on the contrary, will let you wipe out the entire contents of your hard disk; --> DOS や Windows と違い、Linux には組み込みのセキュリティメカニズムがあり ます。ファイルとディレクトリにはパーミッションがあり、その結果として普 通のユーザではアクセスできないものもあります (<ref id="Permissions" name="パーミッションと所有権">を参照)。反対に DOS や Windows ではハー ドディスクの全ての内容を削除できたりしてしまいます。 <item> <!-- there's a special user called ``root'': the system administrator, with full power of life and death on the machine. If you work on your own PC, you'll be root as well. Working as root is <em/dangerous/: any mistake can seriously damage or destroy the system just like with DOS/Win. Don't work as root unless absolutely necessary; --> 「root」(システム管理者) はマシン上の全ての生と死をつかさどる特別なユー ザです。もしも自分の PC を使うなら、あなたも root になることがあります。 root で動き回るのは <em/危険/ です。DOS/Win のように、ささいなミスでも システムに深刻なダメージを与えたり、破壊したりできてしまいます。絶対に 必要というとき以外は root で動き回らないこと。 <item> <!-- much of the complexity of Linux comes from its extreme configurability: virtually every feature and every application can be tailored through one or more configuration files. Complexity is the price to pay for power; --> Linux の複雑さは、そのほとんどどんなことでも設定できてしまうところから 来ます。ほとんど全ての特徴やアプリケーションはひとつかそれ以上の設定ファ イルによって自分の好きなように変更できます。複雑さはパワーを手に入れる ために支払う代償です。 <item> <!-- redirection and piping are a side DOS feature, a very inportant one and much more powerful under Linux. Simple commands can be strung together to accomplish complex tasks. I strongly suggest that you learn how to use them. --> リダイレクトとパイプは DOS ではオマケのような機能ですが、Linux 上では 非常に重要で、もっと力強いものです。簡単なコマンドを束にして複雑なタス クをこなすこともできます。これらの使い方を覚えることを強く推奨します。 </itemize> <sect2> <!-- Getting Help --> 助力を得る <p> <!-- There are many ways to get help with Linux. The most important are: --> Linux で助力を得るにはたくさんの方法があります。もっとも重要な方法は: <itemize> <item> <!-- <em/reading the documentation/ - I mean it. Although the HOWTO you are reading may serve as an introduction to Linux, there are several books that you really should read: Matt Welsh's ``Linux Installation and Getting Started'' (<url url="http://sunsite.unc.edu/mdw/LDP/gs/gs.html">), Larry Greenfield's ``Linux User Guide'' (<url url="ftp://sunsite.unc.edu/pub/Linux/docs/linux-doc-project/users-guide">), and the Linux FAQ (<url url="http://sunsite.unc.edu/mdw/FAQ/Linux-FAQ.html">). Feel a guilty conscience until you have read at least one of them; --> <em/ドキュメントを読む/ --- これは本当です。あなたが読んでいる HOWTO は Linux へのイントロダクションとして使えるかもしれませんが、あなたが 本当に読んだ方がよい本があります。Matt Welsh の 「Linux Installation and Getting Started」(<url url="http://sunsite.unc.edu/mdw/LDP/gs/gs.html">)、Larry Greenfield の 「Linux User Guide」(<url url="ftp://sunsite.unc.edu/pub/Linux/docs/linux-doc-project/users-guide">)、そして Linux FAQ (<url url="http://metalab.unc.edu/pub/Linux/docs/faqs/linux-faq/Linux-FAQ"> : 日本語訳 <url url="http://www.linux.or.jp/JF/JFdocs/Linux-FAQ.html">) です。少なくと もこれらの内ひとつを読むまではうしろめたい思いをしていてください。 <item> <!-- the documentation of the packages installed on the machine is often found in subdirectories under <file>/usr/doc/</file>; --> マシンにインストールされたパッケージのドキュメントは、ほとんどの場合 <file>/usr/doc/</file> 以下のサブディレクトリ内で見付かります。 <item> <!-- to get some help about the ``internal commands'' of the shell, type <tt/help/ or, better, <tt/man bash/ or <tt/info bash/; --> シェルの「内部コマンド」について知りたいなら、<tt/help/ と タイプするか、もっとよいのは <tt/man bash/ や <tt/info bash/ です。 <item> <!-- to get help about a command, type <tt/man command/ that invokes the manual (``man'') page of <tt/command/. Alternatively, type <tt/info command/ that invokes, if available, the info page pertinent of <tt/command/; info is a hypertext-based documentation system, perhaps not intuitive to use at first. Finally, you may try <tt/apropos command/ or <tt/whatis command/. With all of these commands, press `q' to exit. --> コマンドについてしりたいなら、<tt/man command/ とタイプすることで、 <tt/command/ のマニュアル(「man」)ページがあればそれが起動します。 または <tt/info command/ とタイプすることで、使用可能ならば <tt/command/ に関する info ページが起動します。info はハイパーテキスト ベース文章システムで、もしかしたら最初はあまり直観的に使えないかもし れません。最後に、<tt/apropos command/ や <tt/whatis command/ を試して みてはどうでしょう。これらのコマンドは全て「q」で終了します。 <item> <!-- finally, on the Internet: the right place for getting help is Usenet, like <url url="news:comp.os.linux.setup">. Please don't email me for help, because I'm quite overloaded. --> 最後にインターネットです。助力を得られる正しい場所は<url url="news:comp.os.linux.setup"> のような Usenet です。お願いですから 著者に助けてもらうためのメールを送らないでください。 自分のことだけで手一杯なので。 </itemize> <sect1> <!-- Conventions --> 取り決め <p> <!-- Throughout this work, examples will often follow the following format: <tt/<...>/ is a required argument, while <tt/[...]/ an optional one. Example: --> このドキュメント内で例はほとんどの場合以下の形式になります。 <tt/<...>/ は必須の引数で、<tt/[...]/ は省略可能です。 例: <tscreen><verb> $ tar -tf <file.tar> [> redir_file] </verb></tscreen> <!-- <tt>file.tar</tt> must be indicated, but redirection to <tt/redir_file/ is optional. --> ここで <tt>file.tar</tt> は必ず示される必要がありますが、<tt/redir_file/ への リダイレクトは省略可能です。 <!-- ``RMP'' means ``please Read the Man Pages for further information''. I can't stress enough how important reading the documentation is. ``DOSWin'' stands for ``DOS/Windows''. --> 「RPM」とは「please Read the Man Pages for further information (詳しい情報は Man ページを読んでください)」という意味です。 どれだけドキュメントを読むことが大切かは強調しきれないくらいです。 「DOSWin」とは「DOS/Windows」のことです。 <!-- When the prompt of a command example is <tt>#</tt>, the command can only be performed by root. --> コマンドのプロンプトが <tt>#</tt> だったら、そのコマンドは root によってのみ実行できます。 <sect> <!-- For the Impatient --> せっかちな人達へ <p> <!-- Want to strike out? Have a look at this table: --> さっそく始めますか? この表を参照してください。 <!-- I'd like to make this an sgml table, but lynx wouldn't display it correctly. I'll think it over. --> <!-- DOS Linux Notes ATTRIB (+-)attr file chmod <mode> file completely different BACKUP tar -Mcvf device dir/ ditto CD dirname\ cd dirname/ almost the same syntax COPY file1 file2 cp file1 file2 ditto DEL file rm file beware - no undelete DELTREE dirname rm -R dirname/ ditto DIR ls not exactly the same syntax DIR file /S find . -name file completely different EDIT file vi file I think you won't like it jstar file feels like dos' edit EDLIN file ed file forget it FORMAT fdformat, mount, umount quite different syntax HELP command man command, same philosophy info command MD dirname mkdir dirname/ almost the same syntax MORE < file less file much better MOVE file1 file2 mv file1 file2 ditto NUL /dev/null ditto PRINT file lpr file ditto PRN /dev/lp0, /dev/lp1 ditto RD dirname rmdir dirname/ almost the same syntax REN file1 file2 mv file1 file2 not for multiple files RESTORE tar -Mxpvf device different syntax TYPE file less file much better WIN startx poles apart! --> <tscreen><verb> DOS Linux 注意書き ------------------------------------------------------------------------------ ATTRIB (+-)attr file chmod <mode> file 全く違う BACKUP tar -Mcvf device dir/ 同上 CD dirname\ cd dirname/ ほとんど同じ文法 COPY file1 file2 cp file1 file2 同上 DEL file rm file undelete がないことに注目 DELTREE dirname rm -R dirname/ 同上 DIR ls 全く同じ文法でもない DIR file /S find . -name file 完全に別物 EDIT file vi file 好きになれないと思いますよ jstar file DOS の edit のようです EDLIN file ed file 忘れましょう FORMAT fdformat, mount, umount 結構違う文法 HELP command man command, 同じコンセプト info command MD dirname mkdir dirname/ ほとんど同じ文法 MORE < file less file はるかに優秀 MOVE file1 file2 mv file1 file2 同上 NUL /dev/null 同上 PRINT file lpr file 同上 PRN /dev/lp0, /dev/lp1 同上 RD dirname rmdir dirname/ ほとんど同じ文法 REN file1 file2 mv file1 file2 複数ファイルだと違ってくる RESTORE tar -Mxpvf device 違う文法 TYPE file less file はるかに優秀 WIN startx 大違い! </verb></tscreen> <!-- If you need more than a table of commands, please refer to the following sections. --> もしコマンド表以上の情報が必要なら、続く各セクションを参考 にしてください。 <sect> <!-- Meet bash --> bash を使ってみる <p> <!-- Good news: with Linux you type much less at the prompt, because the <tt>bash</tt> shell types for you whenever possible, and features cool line editing capabilities. To begin with, the arrow-up key recalls previous command lines; but there's more. Pressing <TAB> completes file and directory names, so typing --> 吉報です。Linux ではプロンプトでタイプをするのが実に少なくて済みます。 なぜなら <tt>bash</tt> シェルが可能な限りあなたの代わりにタイプしてく れ、さらにすてきなラインエディティング能力を持ちます。まず第一に、上矢印 キーはひとつ前のコマンドを表示させ、さらに <TAB> を押すことでファ イルやディレクトリ名を補完できます。 <!-- $ ls /uTABloTABbTAB --> <tscreen><verb> $ ls /u[TAB]lo[TAB]b[TAB] </verb></tscreen> <!-- is like typing --> は以下のようにタイプしているようなものです。 <tscreen><verb> $ ls /usr/local/bin </verb></tscreen> <!-- If there were ambiguities, as typing --> タイプ時に不明確な場合は <!-- $ ls /uTABloTABiTAB --> <tscreen><verb> $ ls /u[TAB]lo[TAB]i[TAB] </verb></tscreen> <!-- <tt>bash</tt> stops because it doesn't know if you mean <file>/usr/local/info</file> or <file>/usr/local/include</file>. Supply more characters then press <TAB> again. --> <tt>bash</tt> は補完の動きを止めます。なぜならこれが <file>/usr/local/info</file>を指しているのか <file>/usr/local/include</file> を指しているのか分からないからです。 もう少しだけ文字を足して、その後 <TAB> しましょう。 <!-- Other useful key presses are <ESC-BACKSPACE> that deletes a word to the left, while <ESC-D> deletes a word to the right; <ESC-F> moves the cursor one word to the right, <ESC-B> to the left; <CTRL-A> moves to the beginning of the line, <CTRL-E> to the end. The <ALT> key is equivalent to <ESC>. --> ほかの便利なキー操作は左向きに一語を削除する <ESC-BACKSPACE> や 右向きに一語を削除する <ESC-D> です。<ESC-F> はカーソルを 一語分右に移動し、<ESC-B> は左に移動します。 <CTRL-A> は行の最初に移動し、<CTRL-E> で最後に移動します。 <ALT> は <ESC> キーに相当します。 <!-- Enough for now. Once you get used to these shortcuts, you'll find the DOS prompt very annoying... --> 今はこの程度でよいでしょう。一度これらのショートカットに慣れてしまうと DOS のプロンプトにはいらいらさせられるようになるでしょう。 <sect> <!-- Files and Programs --> ファイルとプログラム <p> <sect1> <!-- Files: Preliminary Notions --> ファイル: 予備知識 <p> <!-- Linux has a structure of directories and files very similar to that of DOSWin. Files have filenames that obey special rules, are stored in directories, some are executable, and among these most have command switches. Moreover, you can use wildcard characters, redirection, and piping. There are only a few minor differences: --> Linux は DOS/Win にとても似たディレクトリやファイル構成になっています。 ファイルにはファイル名があり、これらは特別なルールに従います。これらは ディレクトリ内にしまわれ、その中には実行可能ファイルもあり、それらのほ とんどはコマンドスイッチをもっています。さらに、ワイルドカードやリダイ レクト、パイプを使うこともできます。ただし、DOS/Win とは微妙に異なる点 も少しだけあります。 <itemize> <item> <!-- under DOS, file names are in the so-called 8.3 form; e.g. <tt/NOTENOUG.TXT/. Under Linux we can do better. If you installed Linux using a file system like ext2 or umsdos, you can use longer filenames (up to 255 characters), and with more than one dot: for example, <tt/This_is.a.VERY_long.filename/. Please note that I used both upper and lower case characters: in fact... --> DOS 上ではファイル名は 8.3 フォームと呼ばれる形式になっています (例 <tt/NOTENOUG.TXT/ )。Linux ではよりよいものになっています。もしも あなたが ext2 や umsdos 等のファイルシステム上に Linux をインストール した場合は、さらに長いファイル名が使えますし (255 文字まで)、複数の ドットを使うことができます (例えば <tt/This_is.a.VERY_long.filename/)。 ここで大文字と小文字を混ぜて使ったことに注意してください。実は、 <item> <!-- upper and lower case characters in file names or commands are different. Therefore, <tt/FILENAME.tar.gz/ and <tt/filename.tar.gz/ are two different files. <tt/ls/ is a command, <tt/LS/ is a mistake; --> ファイル名やコマンドの大文字と小文字は区別されます。 なので、<tt/FILENAME.tar.gz/ と <tt/filename.tar.gz/ は二つの異なるファ イルです。<tt/ls/ はコマンドですが、<tt/LS/ は間違いです。 <item> <!-- Windows users, beware when using long file names under Linux. If a file name contains spaces (not recommended but possible), you must enclose the file name in double quotes whenever you refer to it. For example: --> Windows ユーザへ。Linux 上で長いファイル名を使う場合は 気を付けなくてはならないことがあります。 もしもファイル名にスペースが含まれている場合 (お勧めしませんが可能です)、 そのファイル名を入力するときはいつでもファイル名を二重引用符で囲む必要があります。 例えば: <!-- $ # the following command makes a directory called "My old files" $ mkdir "My old files" $ ls My old files bin tmp --> <tscreen><verb> $ # 次のコマンドで 「My old files」 という名前のディレクトリを作成します。 $ mkdir "My old files" $ ls My old files bin tmp </verb></tscreen> <!-- Further, some characters shouldn't be used: some are <tt/!*$&#/. --> さらに、次の文字は使うべきではありません: <tt/!*$&#/ <item> <!-- there are no compulsory extensions like .COM and .EXE for programs, or .BAT for batch files. Executable files are marked by an asterisk `<tt/*/' at the end of their name when you issue the <tt/ls -F/ command. For example: --> プログラムには .COM や .EXE 、バッチファイルには .BAT というように決まった 拡張子を付ける必要はありません。<tt/ls -F/ コマンドを実行すると 実行ファイルにはアスタリスク 「<tt/*/」がファイル名の後ろにつきます。 例えば: <tscreen><verb> $ ls -F I_am_a_dir/ cindy.jpg cjpg* letter_to_Joe my_1st_script* old~ </verb></tscreen> <!-- The files <tt/cjpg*/ and <tt/my_1st_script*/ are executables, that is ``programs''. Under DOS, backup files end in .BAK, while under Linux they end with a tilde `<tt/˜/'. Further, a file whose name starts with a dot is considered as hidden. Example: the file <tt/.I.am.a.hidden.file/ won't show up after the <tt/ls/ command; --> <tt/cjpg*/ と <tt/my_1st_script*/ は実行可能ファイル、 つまりは「プログラム」です。バックアップファイル名は DOS 上では .BAK でおわりますが、Linux では波線「<tt/˜/」になります。 さらに、ファイル名がドットから始まるファイルは隠しファイルと見なされま す。例えば <tt/.I.am.a.hidden.file/ という名前のファイルは <tt/ls/ コマンドでは表示されません。 <item> <!-- DOS program switches are obtained with <tt>/switch</tt>, Linux switches with <tt/-switch/ or <tt/switch/. Example: <tt>dir /s</tt> becomes <tt/ls -R/. Note that many DOS programs, like <tt/PKZIP/ or <tt/ARJ/, use UNIX-style switches. --> DOS プログラムのスイッチは <tt>/switch</tt> で使うことができますが、Linux でのスイッチは <tt/-switch/ か <tt/--switch/ となります。つまり <tt>dir /s</tt> は <tt/ls -R/ になります。たくさんの DOS プログラムでも、例えば <tt/PKZIP/ や <tt/ARJ/ などは UNIX スタイルのスイッチを使うことを覚えておいてください。 </itemize> <!-- You can now jump to Section <ref id="Files" name="Translating Commands from DOS to Linux">, but if I were you I'd read on. --> <ref id="Files" name="コマンドを DOS から Linux へ翻訳する"> のセクションまで一気に読み飛ばすこともできますが、 私があなただったらこのまま読み続けます。 <sect1> <!--Symbolic Links--> シンボリックリンク <p> <!-- UNIX has a type of file that doesn't exist under DOS: the symbolic link. This can be thought of as a pointer to a file or to a directory, and can be used instead of the file or directory it points to; it's similar to Windows shortcuts. Examples of symbolic links are <tt>/usr/X11</tt>, which points to <tt>/usr/X11R6</tt>; <tt>/dev/modem</tt>, which points to either <tt>/dev/ttyS0</tt> or <tt>/dev/ttyS1</tt>. --> UNIX には DOS では存在しないようなタイプのファイルがあります。 シンボリックリンクです。これはファイルやディレクトリを指し示すもの (ポインタ) で、それが指し示すファイルやディレクトリの 代わりとして使用できます。これは Windows のショートカット に似ていますね。シンボリックリンクの例として、<tt>/usr/X11R6/</tt> を指し示す <tt>/usr/X11</tt>、<tt>/dev/ttyS0</tt> か <tt>/dev/ttyS1</tt> を指し示す <tt>/dev/modem</tt> 等があります。 <!-- To make a symbolic link: --> シンボリックリンクを作るには: <!-- $ ln -s <file_or_dir> <linkname> --> <tscreen><verb> $ ln -s <file_or_dir> <linkname> </verb></tscreen> <!-- Example: --> 例: <tscreen><verb> $ ln -s /usr/doc/g77/DOC g77manual.txt </verb></tscreen> <!-- Now you can refer to <tt/g77manual.txt/ instead of <tt>/usr/doc/g77/DOC</tt>. Links appear like this in directory listings: --> これで <tt>/usr/doc/g77/DOC</tt> を参照する代わりに <tt/g77manual.txt/ を参照できます。ディレクトリを表示させた場合、リンクは以下のように見えます。 <tscreen><verb> $ ls -F g77manual.txt@ $ ls -l (several things...) g77manual.txt -> /usr/doc/g77/DOC </verb></tscreen> <sect1> <!--Permissions and Ownership--> パーミッションと所有権<label id="Permissions"> <p> <!-- DOS files and directories have the following attributes: A (archive), H (hidden), R (read-only), and S (system). Only H and R make sense under Linux: hidden files start with a dot, and for the R attribute, read on. --> DOS のファイルとディレクトリは次のような属性を持ちます。 A (アーカイブ)、H (隠しファイル)、R (読み専用)、そして S (システムファイル)。 H と R だけが Linux 上では意味のあるものとなりま す。隠しファイルはドットで始まります。 R 属性についてはこのまま読み進めてください。 <!-- Under UNIX a file has ``permissions'' and an owner, who in turn belongs to a ``group''. Look at this example: --> UNIX 上ではファイルには「パーミッション」と所有者、 そして所有グループが存在します。次の例を見てください。 <tscreen><verb> $ ls -l /bin/ls -rwxr-xr-x 1 root bin 27281 Aug 15 1995 /bin/ls* </verb></tscreen> <!-- The first field contains the permissions of the file <tt>/bin/ls</tt>, which belongs to root, group bin. Leaving the remaining information aside, remember that <tt/-rwxr-xr-x/ means, from left to right: --> 最初のフィールドは <tt>/bin/ls</tt> のパーミッションを含み、 <tt>/bin/ls</tt> は root に所有され、グループ bin に所属します。 残りの情報は置いておいて、<tt/-rwxr-xr-x/ の意味を探ってみましょう。 左から右へ読んでいきます。 <!-- <tt/-/ is the file type (<tt/-/ = ordinary file, <tt/d/ = directory, <tt/l/ = link, etc); <tt/rwx/ are the permissions for the file owner (read, write, execute); <tt/r-x/ are the permissions for the group of the file owner (read, execute); (I won't cover the concept of group, you can survive without it as long as you're a beginner ;-) <tt/r-x/ are the permissions for all other users (read, execute). --> <tt/-/ はファイルのタイプを意味します(<tt/-/ = 普通のファイル、 <tt/d/ = ディレクトリ、<tt/l/ = リンク、等)。 <tt/rwx/ はファイル所有者のパーミッションを意味します (read(読み)、write(書き)、execute(実行));(ここでは group の 意味を説明しませんが、初心者ならこの意味を知らなくても やっていけるでしょう ;-) <tt/r-x/ はほかのユーザに対するパーミッション です(read、execute)。 <!-- The directory <tt>/bin</tt> has permissions, too: see Section <ref id="Directories Permissions" name="Directories Permissions"> for further details. This is why you can't delete the file <tt>/bin/ls</tt> unless you are root: you don't have the permission to do so. To change a file's permissions, the command is: --> ディレクトリ <tt>/bin</tt> もパーミッションを持ちます (詳しくは <ref id="Directories Permissions" name="ディレクトリのパーミッション"> を参照)。 root でない限り <tt>/bin/ls</tt> ファイルを削除できないのは、パーミッションで許可されていないからです。 ファイルのパーミッションを変更するには次のようにコマンドを打ちます。 <tscreen><verb> $ chmod <whoXperm> <file> </verb></tscreen> <!-- where who is <tt/u/ (user, that is owner), <tt/g/ (group), <tt/o/ (other), X is either <tt/+/ or <tt/-/, perm is <tt/r/ (read), <tt/w/ (write), or <tt/x/ (execute). Common examples of <tt>chmod</tt> use are the following: --> who は <tt/u/ (user、つまり所有者)、<tt/g/ (group)、<tt/o/ (other)、 X は <tt/+/ か <tt/-/、perm は <tt/r/ (read)、<tt/w/ (write)、か <tt/x/ (execute)。一般的な <tt>chmod</tt> の使い方は次のようになります。 <tscreen><verb> $ chmod +x file </verb></tscreen> <!-- this sets the execute permission for the file. --> これでファイルを実行可能にします。 <tscreen><verb> $ chmod go-rw file </verb></tscreen> <!-- this removes read and write permission for everyone but the owner. --> 所有者以外の読み書き権限を剥奪します。 <tscreen><verb> $ chmod ugo+rwx file </verb></tscreen> <!-- this gives everyone read, write, and execute permission. --> 全てのユーザに読み書き、そして実行の権限を与えます。 <tscreen><verb> # chmod +s file </verb></tscreen> <!-- this makes a so-called ``setuid'' or ``suid'' file a file that everyone can execute with its owner's privileges. Typically, you'll come across root suid files; these are often important system files, like the X server. --> これは「setuid」とか、「suid」と呼ばれるファイル (全てのユーザが 所有者の権限でファイルを実行できる) を作ります。 よく見かけるのは root に setuid したファイルです。 これらは重要なシステムファイルであることがよくあります ( X サーバ等)。 <!-- A shorter way to refer to permissions is with digits: <tt/rwxr-xr-x/ can be expressed as 755 (every letter corresponds to a bit: <tt></tt> is 0, <tt>x</tt> is 1, <tt/-w-/ is 2, <tt/-wx/ is 3...). It looks difficult, but with a bit of practice you'll understand the concept. root, being the superuser, can change everyone's file permissions. RMP. --> 数字を使うことによってパーミッションを素早く設定できます。 <tt/rwxr-xr-x/ は 755 と表現されることができます (全ての文字はビットに対応します:<tt>---</tt> は 0、<tt>--x</tt> は 1、<tt/-w-/ は 2 、<tt/-wx/ は 3 というように)。 難しく見えるかもしれませんが、ちょっと使い込めばすぐ理解 できると思います。 root (スーパーユーザ) は全てのユーザのファイル権限 を変更できます。RMP。 <!-- Files: Translating Commands --> <sect1> ファイル: コマンドを翻訳する <label id="Files"> <p> <!-- On the left, the DOS commands; on the right, their Linux counterpart. --> 左側は DOS コマンド、右側は対応する Linux のコマンド。 <tscreen><verb> ATTRIB: chmod COPY: cp DEL: rm MOVE: mv REN: mv TYPE: more, less, cat </verb></tscreen> <!-- Redirection and plumbing operators: <tt/ < > >> |/ --> リダイレクト記号とパイプ記号: <tt/ < > >> |/ <!-- Wildcards: <tt/* ?/ --> ワイルドカード: <tt/* ?/ <tt>nul: /dev/null</tt> <!--prn, lpt1: /dev/lp0 or /dev/lp1; lpr--> <tt>prn, lpt1: /dev/lp0 か /dev/lp1; lpr</tt> <!--Examples--> <sect2> 例 <p> <tscreen><verb> DOS Linux --------------------------------------------------------------------- C:\GUIDO>ATTRIB +R FILE.TXT $ chmod 400 file.txt C:\GUIDO>COPY JOE.TXT JOE.DOC $ cp joe.txt joe.doc C:\GUIDO>COPY *.* TOTAL $ cat * > total C:\GUIDO>COPY FRACTALS.DOC PRN $ lpr fractals.doc C:\GUIDO>DEL TEMP $ rm temp C:\GUIDO>DEL *.BAK $ rm *~ C:\GUIDO>MOVE PAPER.TXT TMP\ $ mv paper.txt tmp/ C:\GUIDO>REN PAPER.TXT PAPER.ASC $ mv paper.txt paper.asc C:\GUIDO>PRINT LETTER.TXT $ lpr letter.txt C:\GUIDO>TYPE LETTER.TXT $ more letter.txt C:\GUIDO>TYPE LETTER.TXT $ less letter.txt C:\GUIDO>TYPE LETTER.TXT > NUL $ cat letter.txt > /dev/null n/a $ more *.txt *.asc n/a $ cat section*.txt | less </verb></tscreen> <!--Notes:--> 注意: <itemize> <item> <!-- <tt/*/ is smarter under Linux: <tt/*/ matches all files except the hidden ones; <tt/.*/ matches all hidden files (but also the current directory `<tt/./' and parent directory `<tt/../': beware!); <tt/*.*/ matches only those that have a `<tt/./' in the middle or that end with a dot; <tt/p*r/ matches both `peter' and `piper'; <tt/*c*/ matches both `picked' and `peck'; --> <tt/*/ は Linux 上では便利に使えます:<tt/*/ は隠しファイルを除く全て のファイルにマッチします。<tt/.*/ は全ての隠しファイルにマッチ (カレントディレクトリ「<tt/./」と、親ディレクトリ「<tt/../」にもマッチ することに注意!);<tt/*.*/ は中間か終わりがドットのファイルにマッチし、 <tt/p*r/ は「peter」と「piper」両方にマッチします。<tt/*c*/ は「picked」 と「peck」の両方にマッチします。 <item> <!-- when using <tt/more/, press <SPACE> to read through the file, `q' to exit. <tt/less/ is more intuitive and lets you use the arrow keys; --> <tt/more/ を使用するとき、<SPACE> を押してファイルを読み進め、 「q」で終了します。<tt/less/ はさらに直観的に扱え、矢印キーを使うことがで きます。 <item> <!-- there is no <tt/UNDELETE/, so <em/think twice/ before deleting anything; --> <tt/UNDELETE/ は存在しないので、何を削除するまえにも<em/良く考えてくださ い/。 <item> <!-- in addition to DOS' <tt/< > >>/, Linux has <tt/2>/ to redirect error messages (stderr); moreover, <tt/2>&1/ redirects stderr to stdout, while <tt/1>&2/ redirects stdout to stderr; --> DOS で使える <tt/< > >>/ のほかにも、Linux は <tt/2>/ でエラーメッセージ(stderr)をリダイレクトできます。さらに、 <tt/2>&1/ は stderr から stdout にリダイレクトし、 <tt/1>&2/ は stdout から stderr にリダイレクトします。 <item> <!-- Linux has another wildcard: the <tt/[]/. Usage: <tt/[abc]*/ matches files starting with a, b, c; <tt/*[I-N1-3]/ matches files ending with I, J, K, L, M, N, 1, 2, 3; --> Linux にはほかにもワイルドカードがあります。 <tt/[]/ 使い方: <tt/[abc]*/ は a、b、c で始まるファイルにマッチします。<tt/*[I-N1-3]/ は I、J、K、L、M、N、1、2、3 で終わるファイルにマッチします。 <item> <!-- <tt/lpr/ <file> prints a file in background. To check the status of the print queue, use <tt/lpq/; to remove a file from the print queue, use <tt/lprm/; --> <tt/lpr/ <file> はファイルをバックグラウンドで印刷します。 プリント待ちの状態を調べるには <tt/lpq/、プリント待ちの状態から ファイルを削除する場合は <tt/lprm/ を使います。 <item> <!-- there is no DOS-like <tt/RENAME/; that is, <tt/mv *.xxx *.yyy/ won't work. A REN-like command is available on <url url="ftp://sunsite.unc.edu/pub/Linux/utils/file">; --> DOS のような <tt/RENAME/ は存在しません。つまり、<tt/mv *.xxx *.yyy/ はできないということです。REN に似たコマンドは以下で入手可能です。 <url url="ftp://sunsite.unc.edu/pub/Linux/utils/file"> <item> <!-- use <tt/cp -i/ and <tt/mv -i/ to be warned when a file is going to be overwritten. --> <tt/cp -i/ や <tt/mv -i/ を使えばファイルが上書きされるときに 警告を表示できます。 </itemize> <sect1> <!-- Running Programs: Multitasking and Sessions--> プログラムの起動: マルチタスクとセッション <p> <!-- To run a program, type its name as you would do under DOS. If the directory (Section <ref id="Directories" name="Using Directories">) where the program is stored is included in the PATH (Section <ref id="System Initialisation" name="System Initialisation Files">), the program will start. Exception: unlike DOS, under Linux a program located in the current directory won't run unless the directory is included in the PATH. Escamotage: being <tt/prog/ your program, type <tt>./prog</tt>. --> プログラムを起動するには、DOS でするようにプログラム名をタイプします。 もしプログラムが置かれているディレクトリ (セクション <ref id="Directories" name="ディレクトリを使う">) がパス (セクション <ref id="System Initialisation" name="システム初期化ファイル">) に含まれている場合はプログラムは起動するでしょう。例外として、 DOS と違い Linux 上ではカレントディレクトリに置かれたプログラムは カレントディレクトリがパスに含まれていない限り動きません。 対応策: <tt/prog/ プログラムを動かすには、<tt>./prog</tt> とタイプします。 <!-- This is what the typical command line looks like: --> 一般的なコマンドラインは以下のようになります: <tscreen><verb> $ command [-s1 [-s2] ... [-sn]] [par1 [par2] ... [parn]] [< input] [> output] </verb></tscreen> <!-- where <tt>-s1</tt>, ..., <tt>-sn</tt> are the program switches, <tt/par1/, ..., <tt/parn/ are the program parameters. You can issue several commands on the command line: --> <tt>-s1</tt>、...、<tt>-sn</tt> はプログラムのスイッチで、<tt/par1/、 ...、<tt/parn/ はプログラムのパラメータです。コマンドラインで複数のコ マンドを実行することもできます。 <tscreen><verb> $ command1 ; command2 ; ... ; commandn </verb></tscreen> <!-- That's all about running programs, but it's easy to go a step beyond. One of the main reasons for using Linux is that it is a multitasking os it can run several programs (from now on, processes) at the same time. You can launch processes in background and continue working straight away. Moreover, Linux lets you have several sessions: it's like having many computers to work on at once! --> <!-- it's easy to go a step beyond --> これがプログラムを走らせる全てですが、一歩進んだ使い方も簡単にできます。 Linux を使う主な理由のひとつは Linux がマルチタスクな OS だからです。 これは複数のプログラム(これからはプロセスと呼ぶ)を一度に走らせることが できます。プロセスをバックグラウンドで起動してそのまま作業を続ける こともできます。さらに Linux は複数のセッションをあなたに与えてくれます。 これは、まるでたくさんのコンピュータを同時に扱っているみたいですね! <itemize> <item> <!-- To switch to session 1..6 on the virtual consoles, press <ALT-F1> ... <ALT-F6> --> 仮想コンソール上でセッション 1 〜 6 に切替えるには <ALT-F1> 〜 <ALT-F6> と押します。 <item> <!-- To start a new session in the same v.c. without leaving the current one, type <tt/su - <loginname>/. Example: <tt/su - root/. This is useful, for instance, when you need to perform a task that only root can do. --> 現在の仮想コンソールから去ることなく新しいセッションを同じ仮想コンソー ル内で始めるには、<tt/su - <loginname>/ とタイプします。例えば <tt/su - root/。これは root でしか実行できないタスクを実行したいとき などに役に立ちます。 <item> <!-- To end a session, type <tt/exit/. If there are stopped jobs (see later), you'll be warned. --> セッションを終わるには、<tt/exit/ とタイプします。これによって停止された プロセス(後を参照)があれば警告がでます。 <item> <!-- To launch a process in background, add an ampersand '<tt/&/' at the end of the command line: --> バックグラウンドでプロセスを実行するにはアンド「<tt/&/」 をコマンドラインの終わりに付け足します。 <tscreen><verb> $ progname [-switches] [parameters] [< input] [> output] & [1] 123 </verb></tscreen> <!-- the shell identifies the process with a job number (e.g. <tt/[1]/; see below), and with a PID (Process Identification Number; 123 in our example). --> シェルはプロセスをジョブ番号と(例: <tt/[1]/; 下を参考)、 PID 番号(Process Identification Number; 上記の例では 123 )で認識します。 <item> <!-- To see how many processes there are, type <tt/ps ax/. This will output a list of currently running processes. --> いくつのプロセスが実行されているのかを調べるには <tt/ps ax/ と タイプします。これは現在起動しているプロセスのリストを出力します。 <item> <!-- To kill (terminate) a process, type <tt/kill <PID>/. You may need to kill a process when you don't know how to quit it the right way.... Unless you're root, you can't kill other people's processes. Sometimes, a process will only be killed by <tt/kill -SIGKILL <PID>/. --> プロセスを kill する (終了させる) には <tt/kill <PID>/ とタイプします。 どうやればプロセスを正しい方法で終了させるか分からない場合は プロセスを kill することが必要になるかもしれません。 あなたが root でない限り、ほかのユーザのプロセスを kill することはでき ません。プロセスは <tt/kill -SIGKILL <PID>/ によってでしか kill できないこともあります。 <!-- In addition, the shell allows you to stop or temporarily suspend a process, send a process to background, and bring a process from background to foreground. In this context, processes are called ``jobs''. --> 付け加えると、シェルはプロセスを止めたり、一時的にサスペンドしたり、 プロセスをバックグラウンドに送ったり、バックグラウンドから前面に持って来たり できます。この環境ではプロセスは「ジョブ(job)」と呼ばれます。 <item> <!-- To see how many jobs there are, type <tt/jobs/. Here the jobs are identified by their job number, not by their PID. --> いくつのジョブが実行されているかを調べるには <tt/jobs/ とタイプしま す。ここではジョブは PID 番号ではなくジョブ番号によって認識されます。 <item> <!-- To stop a process running in foreground, press <CTRL-C> (it won't always work). --> 最前面で実行されているプロセスを止めるには <CTRL-C> を押します (いつもうまく行くとは限りません)。 <item> <!-- To suspend a process running in foreground, press <CTRL-Z> (ditto). --> 最前面で実行されているプロセスをサスペンドするには <CTRL-Z> を押します(同上)。 <item> <!-- To send a suspended process into background, type <tt/bg <%job>/ (it becomes a job). --> サスペンドされていたプロセスをバックグラウンドに呼び戻すには <tt/bg <%job/ とタイプします(これはジョブになる)。 <item> <!-- To bring a job to foreground, type <tt/fg <%job>/. To bring to foreground the last job sent to background, simply type <tt/fg/. --> ジョブを最前面に持って来るには <tt/fg <%job/ とタイプします。 最後にバックグラウンドに送られたジョブを最前面に持って来るには単純に <tt/fg/ とタイプします。 <item> <!-- To kill a job, type <tt/kill <%job>/ where <job> may be 1, 2, 3,... --> ジョブを kill するには、<tt/kill <%job/ とタイプします。 <%job の所は 1、2、3 .. のようになります。 </itemize> <!-- Using these commands you can format a disk, zip a bunch of files, compile a program, and unzip an archive all at the same time, and still have the prompt at your disposal. Try this with Windows, just to see the difference in performance (if it doesn't crash, of course). --> これらのコマンドを使うことによってディスクをフォーマットしたり、 たくさんのファイルを zip で圧縮したり、プログラムをコンパイルしたり、 アーカイブを unzip したりしつつ、同じときにプロンプトを自由 に使えます。同じことを Windows 上でやってみてどれだけ パフォーマンスに違いがあるか試してみてください(もちろんクラッシュ しなかったらの話ですが)。 <sect1> <!--Running Programs on Remote Computers--> リモートコンピュータ上でプログラムを実行する <p> <!-- To run a program on a remote machine whose name is <tt/remote.machine.edu/: --> <tt/remote.machine.edu/ という名前のリモートマシン上でプログラムを実行 するには: <tscreen><verb> $ telnet remote.machine.edu </verb></tscreen> <!-- After logging in, start your favourite program. Needless to say, you must have a shell account on the remote machine. --> ログインの後は好きなプログラムを実行できます。当然ですが、 あなたはリモートマシン上にもアカウントを持っている必要があります。 <!-- If you have X11, you can even run an X application on a remote computer, displaying it on your X screen. Let <tt/remote.machine.edu/ be the remote X computer and let <tt/local.linux.box/ be your Linux machine. To run from <tt/local.linux.box/ an X program that resides on <tt/remote.machine.edu/, do the following: --> もしも X11 を持っているならリモートコンピュータ上で X アプリケーショ ンを実行して、それを自分の X 画面上に表示することもできます。<tt/remote.machine.edu/ がリモート X コンピュータで <tt/local.linux.box/ があなたの Linux マ シンだと想定すると <tt/local.linux.box/ から <tt/remote.machine.edu/ にある X プログラムを実行するには以下のようにします: <itemize> <item> <!-- fire up X11, start an <tt/xterm/ or equivalent terminal emulator, then type: --> X11 を立ち上げ <tt/xterm/ か同等のターミナルエミュレータを起動し、 以下のようにタイプします: <tscreen><verb> $ xhost +remote.machine.edu $ telnet remote.machine.edu </verb></tscreen> <item> <!-- after logging in, type: --> ログインが終わったら次のようにタイプします: <tscreen><verb> remote:$ DISPLAY=local.linux.box:0.0 remote:$ progname & </verb></tscreen> <!-- (instead of <tt/DISPLAY.../, you may have to write: <tt/setenv DISPLAY local.linux.box:0.0/. It depends on the remote shell.) --> (<tt/DISPLAY.../ とタイプする代わりに、<tt/setenv DISPLAY local.linux.box:0.0/ とタイプする必要があるかもしれません。これは リモートコンピュータのシェル次第) </itemize> <!-- Et voila! Now <tt/progname/ will start on <tt/remote.machine.edu/ and will be displayed on your machine. Don't try this over the modem though, for it's too slow to be usable. Moreover, this is a crude and insecure method: please read the ``Remote X Apps mini-HOWTO'' at <url url="http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps">. --> するとどうでしょう! <tt/progname/ が <tt/remote.machine.edu/ で起動され、 あなたのマシン上に表示されます。しかし遅くて使い物にならない のでこれをモデム間では行わないください。さらに、これは危なっかしく雑 な方法です。「Remote X Apps mini-HOWTO」 <url url="http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps.html"> (日本語訳: <url url="http://www.linux.or.jp/JF/JFdocs/Remote-X-Apps.html">) を読んでみてください。 <!--Using Directories --> <sect> ディレクトリを使う <label id="Directories"> <p> <!--Directories: Preliminary Notions--> <sect1> ディレクトリ: 予備知識 <p> <!-- We have seen the differences between files under DOSWin and Linux. As for directories, under DOSWin the root directory is <tt/\/, under Linux it is <tt>/</tt>. Similarly, nested directories are separated by <tt/\/ under DOSWin, by <tt>/</tt> under Linux. Example of file paths: --> これまで DOSWin と Linux 上でのファイルの違いについて見てきました。 ディレクトリでは DOSWin 上ではルートディレクトリは <tt/\/ ですが、 Linux 上では <tt>/</tt> となります。同様に、ネストされたディレクトリは DOSWin 上では <tt/\/ で、Linux 上では <tt>/</tt> で分けられます。 ファイルパスの例: <tscreen><verb> DOS: C:\PAPERS\GEOLOGY\MID_EOC.TEX Linux: /home/guido/papers/geology/middle_eocene.tex </verb></tscreen> <!-- As usual, <tt/../ is the parent directory and <tt/./ is the current directory. Remember that the system won't let you <tt/cd/, <tt/rd/, or <tt/md/ everywhere you want. Each user has his or her stuff in a directory called `home', given by the system administrator; for instance, on my PC my home dir is <tt>/home/guido</tt>. --> いつものように、<tt/../ は親ディレクトリ、<tt/./ はカレントディレクト リを示します。覚えておいて欲しいのは、システムはあなたに <tt/cd/ や <tt/rd/ をどこでも実行させてくれるわけではないということです。それぞれのユーザは システム管理者からもらう「home」と呼ばれるディレクトリ内にそれぞれの ファイル等を保持します。例えば私のコンピュータの私のホームディレクト リは <tt>/home/guido</tt> です。 <sect1> <!--Directories Permissions --> ディレクトリのパーミッション<label id="Directories Permissions"> <p> <!-- Directories, too, have permissions. What we have seen in Section <ref id="Permissions" name="Permissions and Ownership"> applies to directories as well (user, group, and other). For a directory, <tt/rx/ means you can <tt/cd/ to that directory, and <tt/w/ means that you can delete a file in the directory (according to the file's permissions, of course), or the directory itself. --> ディレクトリもパーミッションを持っています。<ref id="Permissions" name="パーミッションと所有権"> セクションで 覚えたことはディレクトリにも通用します( user、group、と other)。 ディレクトリの場合 <tt/rx/ というのはあなたがそのディレクトリに <tt/cd/ できるということです。そして <tt/w/ の意味はディレクトリ 内にあるファイルやディレクトリ自体を削除できるということです (もちろんファイルのパーミッションに従ってですが)。 <!-- For example, to prevent other users from snooping in <tt>/home/guido/text</tt>: --> 例えば、ほかのユーザが <tt>/home/guido/text</tt> 内で うろつくのを防ぐには: <tscreen><verb> $ chmod o-rwx /home/guido/text </verb></tscreen> <sect1> <!--Directories: Translating Commands --> ディレクトリに関して : DOS と Linux でのコマンドの対応<label id="Directories : Trans"> <p> <tscreen><verb> DIR: ls, find, du CD: cd, pwd MD: mkdir RD: rmdir DELTREE: rm -rf MOVE: mv </verb></tscreen> <sect2> <!--Examples--> 例 <p> <tscreen><verb> DOS Linux --------------------------------------------------------------------- C:\GUIDO>DIR $ ls C:\GUIDO>DIR FILE.TXT $ ls file.txt C:\GUIDO>DIR *.H *.C $ ls *.h *.c C:\GUIDO>DIR/P $ ls | more C:\GUIDO>DIR/A $ ls -l C:\GUIDO>DIR *.TMP /S $ find / -name "*.tmp" C:\GUIDO>CD $ pwd N/A - 「注意」を参照 $ cd 同上 $ cd ~ 同上 $ cd ~/temp C:\GUIDO>CD \OTHER $ cd /other C:\GUIDO>CD ..\TEMP\TRASH $ cd ../temp/trash C:\GUIDO>MD NEWPROGS $ mkdir newprogs C:\GUIDO>MOVE PROG .. $ mv prog .. C:\GUIDO>MD \PROGS\TURBO $ mkdir /progs/turbo C:\GUIDO>DELTREE TEMP\TRASH $ rm -rf temp/trash C:\GUIDO>RD NEWPROGS $ rmdir newprogs C:\GUIDO>RD \PROGS\TURBO $ rmdir /progs/turbo </verb></tscreen> <!--Notes:--> 注意: <itemize> <item> <!-- when using <tt/rmdir/, the directory to remove must be empty. To delete a directory and all of its contents, use <tt/rm -rf/ (at your own risk). --> <tt/rmdir/ を使うときは削除されるディレクトリは空っぽでなくてはいけま せん。ディレクトリとそれ以下の全てのファイルを削除するには <tt/rm -rf/ を使ってください (するときは自分の責任で)。 <item> <!-- the character `<tt/˜/' is a shortcut for the name of your home directory. The commands <tt/cd/ or <tt/cd ~/ will take you to your home directory from wherever you are; the command <tt>cd ~/tmp</tt> will take you to <tt>/home/your_home/tmp</tt>. --> 「<tt/˜/」はあなたのホームディレクトリ名のショートカットです。 <tt/cd/ か <tt/cd ˜/ することで、どこにいても自分のホームディレクトリに 移動できます。<tt>cd ˜/tmp</tt> とタイプすれば <tt>/home/your_home/tmp</tt> に移動します。 <item> <!-- <tt/cd -/ ``undoes'' the last <tt/cd/. --> <tt/cd -/ は最後の <tt/cd コマンド/ を 「やりなおします」。 </itemize> <sect> <!--Floppies, Hard Disks, and the Like --> フロッピー、ハードディスク等<label id="Floppies"> <p> <!-- There are two ways to manage devices under Linux: the DOS way and the UNIX way. Take your pick. --> デバイスを Linux 上で管理する方法は二種類あります: DOS スタイルと UNIX スタイル。好きな方を選んでください。 <sect1> <!-- Managing Devices the DOS Way--> DOS スタイルでデバイスを管理する <p> <!-- Most Linux distributions include the Mtools suite, a set of commands that are perfectly equivalent to their DOS counterpart, but start with an `m': i.e., <tt/mformat/, <tt/mdir/, <tt/mdel/, <tt/mmd/, and so on. They can even preserve long file names, but not file permissions. If you configure Mtools editing a file called <file>/etc/mtools.conf</file> (a sample is provided in the distribution), you can also access the DOS/Win partition, the CD ROM, and the Zip drive. To format a fresh disk though, the <tt/mformat/ command won't do. As root, you'll have to issue this command beforehand: <tt>fdformat /dev/fd0H1440</tt>. --> ほとんどの Linux ディストリビューションは Mtools を含みます。 これは、働きは DOS のものとまったく同じコマンド群ですが、 コマンド名の頭に m がついています。例えば <tt/mformat/、<tt/mdir/、 <tt/mdel/、<tt/mmd/ といった ようにです。これらはロングファイル名を保持することもできますが、 ファイルのパーミッションの保持はできません。 Mtools の設定ファイル <file>/etc/mtools.conf</file> (サンプ ルはディストリビューションから提供されています) を編集すれば、 DOS/Win パーティション、CD-ROM、ZIP ドライブにアクセスできるようになります。 しかし、新しいディスクをフォーマットするには <tt/mformat/ ではなく root 権限で <tt>fdformat /dev/fd0H1440</tt> を 実行しなくてはいけません。 <!-- You can't access files on the floppy with a command like, say, <tt>less a:file.txt</tt>! This is the disadvantage of the DOS way of accessing disks. --> <tt>less a:file.txt</tt> のようにフロッピーにアクセスすることは できません! これは DOS スタイルでディスクにアクセスする不便さとも言えます。 <sect1> <!-- Managing Devices the UNIX Way--> UNIX スタイルでデバイスを管理する <p> <!-- UNIX has a different way to handle devices. There are no separate volumes like A: or C:; a disk, be it a floppy or whatever, becomes part of the local file system through an operation called ``mounting''. When you're done using the disk, before extracting it you must ``unmount'' it. --> UNIX は異なった方法でデバイスを扱います。これには A: や C: ドライブのような別々 に分かれたボリュームは存在しません。フロッピーだろうが何だろうが、ディス クは「マウント」することによってローカルシステムの一部になります。ディスクを 使用し終わったときはディスクを取り出すまえに「アンマウント」をする必要があ ります。 <!-- Physically formatting a disk is one thing, making a file system on it is another. The DOS command <tt/FORMAT A:/ does both things, but under Linux there are separate commands. To format a floppy, see above; to create a file system: --> 物理的にディスクをフォーマットするのと、ファイルシステムをその上に 作成するのは別のことです。DOS のコマンド <tt/FORMAT A:/ は両方を行いま すが、Linux 上では別々のコマンドで行います。フロッピーをフォーマットす るには上を参照してください。ファイルシステムを作成するには: <tscreen><verb> # mkfs -t ext2 -c /dev/fd0H1440 </verb></tscreen> <!-- You can use <tt/dos/, <tt/vfat/ (recommended) or other formats instead of <tt/ext2/. Once the disk is prepared, mount it with the command --> <tt/dos/、<tt/vfat/ (推奨) や、そのほかのフォーマットを <tt/ext2/ の 代わりに使うこともできます。ディスクが準備されたら次のコマンド でマウントします。 <tscreen><verb> # mount -t ext2 /dev/fd0 /mnt </verb></tscreen> <!-- specifying the right file system if you don't use <tt/ext2/. Now you can address the files in the floppy using <tt>/mnt</tt> instead of A: or B:. Examples: --> <tt/ext2/ を使わない場合は正しいファイルシステムを指定してください。 これで、A: や B: の代わりに <tt>/mnt</tt> を使ってフロッピー内のファイルを 参照できます。例: <tscreen><verb> DOS Linux --------------------------------------------------------------------- C:\GUIDO>DIR A: $ ls /mnt C:\GUIDO>COPY A:*.* $ cp /mnt/* . C:\GUIDO>COPY *.ZIP A: $ cp *.zip /mnt C:\GUIDO>EDIT A:FILE.TXT $ jstar /mnt/file.txt C:\GUIDO>A: $ cd /mnt A:> _ /mnt/$ _ </verb></tscreen> <!-- When you've finished, before extracting the disk you <em/must/ unmount it with the command --> 使い終わったらディスクを引き抜くまえに<em/絶対に/次のコマンドで アンマウントをしてください。 <tscreen><verb> # umount /mnt </verb></tscreen> <!-- Obviously, you have to <tt/fdformat/ and <tt/mkfs/ only unformatted disks, not previously used ones. If you want to use the drive B:, refer to <tt/fd1H1440/ and <tt/fd1/ instead of <tt/fd0H1440/ and <tt/fd0/ in the examples above. --> 当然ですが、<tt/fdformat/ と <tt/mkfs/ をしなくてはいけないのは フォーマットされていないディスクに対してだけで、以前使われたことの あるディスクにではありません。もし B: ドライブを使いたい場合は 上の例の <tt/fd0H1440/ と <tt/fd0/ を、 <tt/fd1H1440/ と <tt/fd1/ に入れ換えてください。 <!-- Needless to say, what applies to floppies also applies to other devices; for instance, you may want to mount another hard disk or a CD ROM drive. Here's how to mount the CD ROM: --> いう必要もありませんが、フロッピーに通用することはほかのデバイスにも あてはまります。例えば、ほかのハードディスクや CD-ROM ドライブをマウント したいときは、下の方法で CD-ROM をマウントできます。 <tscreen><verb> # mount -t iso9660 /dev/cdrom /mnt </verb></tscreen> <!-- This was the ``official'' way to mount your disks, but there's a trick in store. Since it's a bit of a nuisance having to be root to mount a floppy or a CD ROM, every user can be allowed to mount them this way: --> これは「正式」なマウントの仕方ですが、とっておきの裏技があります。 フロッピーや CD-ROM をマウントするためにわざわざ root になるのも 面倒なので、以下の方法で全てのユーザがマウントできるようになります: <itemize> <item> <!-- as root, do the following: --> root になって以下を行います: <!-- # mkdir /mnt/floppy ; mkdir /mnt/cdrom # chmod 777 /mnt/floppy /mnt/cd* # # make sure that the CD-ROM device is right # chmod 666 /dev/hdb ; chmod 666 /dev/fd* --> <tscreen><verb> # mkdir /mnt/floppy ; mkdir /mnt/cdrom # chmod 777 /mnt/floppy /mnt/cd* # # 正しい CD-ROM デバイスか確認 # chmod 666 /dev/hdb ; chmod 666 /dev/fd* </verb></tscreen> <item> <!-- add in <file>/etc/fstab</file> the following lines: --> <file>/etc/fstab</file> に次の行を付け足します: <tscreen><verb> /dev/cdrom /mnt/cdrom iso9660 ro,user,noauto 0 0 /dev/fd0 /mnt/floppy vfat user,noauto 0 0 </verb></tscreen> </itemize> <!--Now, to mount a DOS floppy and a CD-ROM:--> そして DOS フロッピーや CD-ROM をマウントするには: <tscreen><verb> $ mount /mnt/floppy $ mount /mnt/cdrom </verb></tscreen> <!-- <file>/mnt/floppy</file> and <file>/mnt/cdrom</file> can now be accessed by every user. Remember that allowing everyone to mount disks this way is a gaping security hole, if you care. --> <file>/mnt/floppy</file> と <file>/mnt/cdrom</file> はこれで全てのユーザからアクセスできます。 この方法で全てのユーザからのマウントを可能にさせることは、 重大なセキュリティホール にもつながることを覚えておいてください(あなたが気にすればの話ですが)。 <!-- Two useful commands are <tt/df/, which gives information on the mounted file systems, and <tt/du dirname/ which reports the disk space consumed by the directory. --> 二つの役に立つコマンドは、マウントされたファイルシステムの情報を表示す る <tt/df/ と、ディレクトリによって使われているディスク容量を報告する <tt/du dirname/ です。 <sect1> <!--Backing Up --> バックアップ <label id="Backing Up"> <p> <!-- There are several packages to help you, but the very least you can do for a multi-volume backup is (as root): --> いくつかの役に立つパッケージがありますが、マルチボリュームバックアップ で最低限できることとして ( root 権限): <tscreen><verb> # tar -M -cvf /dev/fd0H1440 dir_to_backup/ </verb></tscreen> <!-- Make sure to have a formatted floppy in the drive, and several more ready. To restore your stuff, insert the first floppy in the drive and do: --> フォーマットされたフロッピーがドライブに入っていて、挿入されているもの 以外にも何枚か用意されていることを確認してください。 フロッピー内のファイルを元に戻すには、最初のフロッピー をドライブに入れて次のコマンドを実行してください。 <tscreen><verb> # tar -M -xpvf /dev/fd0H1440 </verb></tscreen> <sect> <!--What About Windows?--> Windows は? <p> <!-- The ``equivalent'' of Windows is the graphic system X Window System. Unlike Windows or the Mac, X11 wasn't designed for ease of use or to look good, but just to provide graphic facilities to UNIX workstations. These are the main differences: --> Windows に「相当するもの」として、グラフィックシステム X Window System があります。Windows や Mac と違い、X11 は使いやすくするためや、見た目 を良くするために設計されたのではなく、UNIX ワークステーションにグラフィッ ク設備を提供するために設計されました。以下は主要な違いです。 <itemize> <item> <!-- while Windows looks and feels the same all over the world, X11 does not: it's much more configurable. X11's overall look is given by a key component called ``window manager'', of which you have a wide choice: <tt/fvwm/, basic but nice and memory efficient, <tt/fvwm2-95/, <tt/Afterstep/, <tt/WindowMaker/, <tt/Enlightenment/, and many more. The w.m. is usually invoked from <tt/.xinitrc/; --> Windows の見た目と動作は世界中どこでも同じですが、X11 は違います。 断然に設定度が自由で、X11 の全体的な見た目は「Window Manager」 と呼ばれる要素から成り立ちます。これらには次のような種類があります: <tt/fvwm/ は基本的ですが悪くないしメモリ節約にもなります。<tt/fvwm2-95/、 <tt/Afterstep/、<tt/WindowMaker/、<tt/Enlightenment/、とそのほか多数。 Window Manager は普通 <tt/.xinitrc/ から呼び出されます。 <item> <!-- your w.m. can be configured so as a window acts as under, er, Windows: you click on it and it comes to foreground. Another possibility is that it comes to foreground when the mouse moves over it (``focus''). Also, the placement of windows on the screen can be automatic or interactive: if a strange frame appears instead of your program, left click where you want it to appear; --> Window Manager の設定次第では、個々のウインドウを実はあの Windows のように 操作できてしまいます (クリックすると前面にでてくる)。ほかの 可能性としては、マウスがそれの上に来たときに (フォーカス) 前面にでてき ます。ウインドウが画面上に置かれる位置は自動かインタラクティブかのどっ ちかになります。もし妙なフレームがプログラムの代わりに現れたら、ウイン ドウを表示したい位置で左クリックをしてください。 <item> <!-- most features can be tailored editing one or more configuration files. Read the docs of your w.m.: the configuration file can be <tt/.fvwmrc/, <tt/.fvwm2rc95/, <tt/.steprc/, etc. A sample configuration file is typically found in <file>/etc/X11/window-manager-name/system.window-manager-name</file>; --> ほとんどの機能はひとつかそれ以上の設定ファイルを編集することによって カスタマイズができます。Window Manager のドキュメントを読みましょう: 設定ファイ ルは <tt/.fvwmrc/、<tt/.fvwm2rc95/、<tt/.steprc/ 等。サンプルの設定ファ イルは普通 <file>/etc/X11/window-manager-name/system.window-manager-name</file> で見付かります。 <item> <!-- X11 applications are written using special libraries (``widget sets''); as several are available, applications look different. The most basic ones are those that use the Athena widgets (2D look; <tt/xdvi/, <tt/xman/, <tt/xcalc/); others use Motif (<tt/netscape/), others still use Tcl/Tk, XForms, Qt, Gtk, and what have you. Nearly all of these libraries provide roughly the same look and feel as Windows; --> X11 アプリケーションは特別なライブラリを使って書かれています(「ウィ ジェットセット」)。これにはいくつか種類がありますので、アプリケーションは 見た目が違って見えます。最も基本的なのは Athena ウィジェットを使った アプリケーションです (2-D の見た目;<tt/xdvi/、<tt/xman/、 <tt/xcalc/ 等)。Motif を使うものもあります (<tt/netscape/)。ほかには Tcl/Tk、XForms、Qt、Gtk、等。これらほとんどのライブラリは Windows とほぼ同じ見た目と動作を提供します。 <item> <!-- the feel, unfortunately, can be incoherent. For instance, if you select a line of text using the mouse and press <BACKSPACE>, you'd expect the line to disappear, right? This doesn't work with Athena based apps, but it does with other widget sets; --> 動作はあいにく統一されていません。 例えば、一行のテキストをマウスで選択して、<BACKSPACE> を 押せばその行が消えると思いますよね? でも、これは Athena ベースの アプリケーションでは通用しません。それ以外でのウィジェットセット では通用しますが。 <item> <!-- how scrollbars and resizing work depends on the w.m. and the widget set. Tip: if you find that the scrollbars don't behave as you would expect, try using the central button or the two buttons together to move them; --> スクロールバーやサイズ変更がどのように作用するかは Window Manager とウィジェットセット次第です。ヒント: もしもスクロールバー があなたの思った通りに動いてくれなかったら真ん中のボタンか、または 二つのボタンを一緒に押してこれらを動かしてみましょう。 <item> <!-- applications don't have an icon by default, but they can have many. Most w.m. feature a menu you recall by clicking on the desktop (``root window''); needless to say, the menu can be tailored. To change the root window appearance, use <tt/xsetroot/ or <tt/xloadimage/; --> アプリケーションはデフォルトではアイコンを持ちませんが、 たくさん持つこともできます。ほとんどの Window Manager はデスクトップ (「ルートウインドウ」) をクリックすることでメニューがでます。言うまで もなく、このメニューも好きなように設定できます。ルートウインドウの見た 目を変更するには <tt/xsetroot/ か<tt/xloadimage/ を使います。 <item> <!-- the clipboard can only contain text, and behaves strange. Once you've selected text, it's already copied to the clipboard: move elsewhere and press the central button to paste it. There's an application, <tt/xclipboard/, that provides for multiple clipboard buffers; --> クリップボードはテキストのみ保持でき、奇妙な動きをします。 [訳注: 左ボタンをドラッグして] テキストを選択したら、その時点 でテキストはクリップボードにコピーされています。好きな場所に移動してか ら中央のボタンを押して貼りつけします。<tt/xclipboard/ というアプリケー ションを使えば複数のテキストがクリップボードに保存できます。 <item> <!-- drag and drop is an option, and is only available if you use X11 applications and/or w.m. that support it. --> ドラッグアンドドロップはサポートされているアプリケーション、または Window Manager 上で使用可能です。 </itemize> <!-- To save memory, one should use applications that use the same libraries, but this is difficult to do in practice. --> メモリの節約のため、同じライブラリを使うアプリケーションだけを 使うべきですが、これは実際には難しいでしょう。 <!-- There are projects that aim at making X11 look and behave as coherently as Windows. Gnome, <url url="http://www.gnome.org"> and KDE, <url url="http://www.kde.org">, are awesome. Give them a try: you won't regret your Windows desktop anymore. --> X11 の見た目と動作を Windows と同じくらい統一させることを 目的としているプロジェクトがあります。 GNOME <url url="http://www.gnome.org"> (日本 GNOME ユーザ会 <url url="http://www.gnome.gr.jp">) や KDE <url url="http://www.kde.org"> (日本 KDE ユーザ会 <url url="http://www.kde.gr.jp">) は素晴らしいです。 試してみてください。もう Windows がなくてもよくなるでしょう。 <sect> <!--Tailoring the System--> システムを自分好みに仕立てる <p> <sect1> <!-- System Initialisation Files --> システム初期化ファイル <label id="System Initialisation"> <p> <!-- Two important files under DOS are <tt/AUTOEXEC.BAT/ and <tt/CONFIG.SYS/, which are used at boot time to initialise the system, set some environment variables like PATH and FILES, and possibly launch a program or batch file. Under Linux there are lots of initialisation files, some of which you had better not tamper with until you know exactly what you are doing. I'll tell you what the most important are, anyway: --> DOS 上での二つの重要なファイルは <tt/AUTOEXEC.BAT/ と <tt/CONFIG.SYS/ です。ブート時にシステムを初期化したり、PATH や FILES 等の環境変数を 設定したり、プログラムやバッチファイルを起動することもできます。 Linux 上ではたくさんの初期化ファイルがあります。その中のいくつかは 自分が何をやっているのか完全に分かるようになるまではいじくらないほう がよいものもあります。とりあえず、どれが一番重要か紹介します。 <!-- FILES NOTES /etc/inittab don't touch for now! /etc/rc.d/* ditto --> <tscreen><verb> ファイル 注意 /etc/inittab 今のところはさわらない! /etc/rc.d/* 同上 </verb></tscreen> <!-- If all you need is setting the PATH and other environment variables, or you want to change the login messages or automatically launch a program after the login, have a look at the following files: --> もしあなたが PATH やそのほかの環境変数の設定、 ログインメッセージの変更や、ログイン後に自動でプログラムを起動 したいだけなら、次のファイルを参照してください。 <!-- FILES NOTES /etc/issue sets pre-login message /etc/motd sets post-login message /etc/profile sets $PATH and other variables, etc. /etc/bashrc sets aliases and functions, etc. /home/your_home/.bashrc sets your aliases + functions /home/your_home/.bash_profile or /home/your_home/.profile sets environment + starts your progs --> <tscreen><verb> ファイル 注意 /etc/issue ログインまえのメッセージ設定 /etc/motd ログイン後のメッセージ設定 /etc/profile $PATH やそのほかの環境変数設定、そのほか /etc/bashrc エイリアスや関数の設定、そのほか /home/your_home/.bashrc あなたのエイリアスや関数の設定 /home/your_home/.bash_profile または /home/your_home/.profile 環境設定、あなたのプログラム起動 </verb></tscreen> <!-- If the latter file exists (note that it is a hidden file), it will be read after the login, and the commands therein will be executed. --> 最後に挙げたどちらかのファイル(これは隠しファイルなので注意)が存在する 場合、これらはログイン後に読み込まれ、ファイル内に書かれたコマンドが実 行されます。 <!-- Example の後に原文では - が三つ続いたのですが --> <!-- それだとコメントにできないので削除しました --> <!-- Example - look at this <tt/.bash_profile/: --> 例 --- これを参照 <tt/.bash_profile/: <!-- # I am a comment echo Environment: printenv | less # equivalent of command SET under DOS alias d='ls -l' # easy to understand what an alias is alias up='cd ..' echo "I remind you that the path is "$PATH echo "Today is `date`" # use the output of the command 'date' echo "Have a good day, "$LOGNAME # The following is a "shell function" ctgz() # List the contents of a .tar.gz archive. { for file in $* do gzip -dc ${file} | tar tf - done } # end of .profile --> <code> # これはコメント echo Environment: printenv | less # DOS 上の SET コマンドに相当 alias d='ls -l' # エイリアスとは何か簡単に理解できる alias up='cd ..' echo "あなたのパスは "$PATH echo "今日は `date`" # コマンド 'date' の出力を使用 echo "よい一日を、"$LOGNAME # これは "シェル関数" です ctgz() # .tar.gz アーカイブの内容をリスト { for file in $* do gzip -dc ${file} | tar tf - done } # end of .profile </code> <!-- <tt/$PATH/ and <tt/$LOGNAME/, you guessed right, are environment variables. There are many others to play with; for instance, RMP for apps like <tt/less/ or <tt/bash/. --> <tt/$PATH/ と <tt/$LOGNAME/ はお察しの通り 環境変数です。ほかにもたくさんのものがあります。例えば <tt/less/ や <tt/bash/ のようなアプリケーションを RMP してください。 <!-- Putting this line in your <file>/etc/profile</file> will provide the rough equivalent of <tt>PROMPT $P$G</tt>: --> 以下の行を <file>/etc/profile</file> に追加することで <tt>PROMPT $P$G</tt>に相当するプロンプトを提供します。 <tscreen><verb> export PS1="\w\\$ " </verb></tscreen> <sect1> <!-- Program Initialisation Files--> プログラム初期化ファイル <p> <!-- Under Linux, virtually everything can be tailored to your needs. Most programs have one or more initialisation files you can fiddle with, often as a <tt/.prognamerc/ in your home dir. The first ones you'll want to modify are: --> Linux 上ではほとんど全てをあなたの好みに仕立てることができます。 ほとんどのプログラムはひとつ以上のあなたが好きにできる初期化ファイル が普通は <tt/.prognamerc/ というような名前であなたのホームディレクトリ に置かれています。最初に編集するべきなのは: <itemize> <item> <!-- <tt/ .inputrc/: used by <tt/bash/ to define key bindings; --> <tt/ .inputrc/: <tt/bash/ によってキーバインディングを定義する <item> <!-- <tt/ .xinitrc/: used by <tt/startx/ to initialise X Window System; --> <tt/ .xinitrc/: <tt/startx/ によって X Window System を初期化する <item> <!-- <tt/ .fvwmrc/: used by the window manager <tt/fvwm/. --> <tt/ .fvwmrc/: ウインドウマネージャ <tt/fvwm/ によって使用される <item> <!-- <tt/ .joerc, .jstarrc/: used by the editor <tt/joe/; --> <tt/ .joerc, .jstarrc/: エディタ <tt/joe/ によって使用される <item> <!-- <tt/ .jedrc/: used by the editor <tt/jed/; --> <tt/ .jedrc/: エディタ <tt/jed/ によって使用される <item> <!-- <tt/ .pinerc/: used by the mail reader <tt/pine/; --> <tt/ .pinerc/: メールリーダ <tt/pine/ によって使用される <item> <!-- <tt/ .Xdefault/: used by many X programs. --> <tt/ .Xdefault/: たくさんの X プログラムによって使用される </itemize> <!-- For all of these and the others you'll come across sooner or later, RMP. Perhaps I could interest you in the Configuration HOWTO, <url url="http://sunsite.unc.edu/mdw/HOWTO/Config-HOWTO.html">? --> 以上の各ファイルのほか、あなたがいずれ扱うことになるファイル については、RMP してください。 Configuration HOWTO を読んでみてもよいかもしれません <url url="http://sunsite.unc.edu/mdw/HOWTO/Config-HOWTO.html"> (日本語訳:<url url="http://www.linux.or.jp/JF/JFdocs/Config-HOWTO.html">。 <sect> <!-- Networking: Concepts--> ネットワーキング: コンセプト <p> <!-- Not only is ``Dialup Networking'' available under Linux, it's also more stable and quicker. The name of the game is ``PPP'', the protocol employed for connecting to the Internet using modems. You need a kernel that supports PPP and a tool that dials and makes the connection. --> Linux 上では「ダイアルアップネットワーク」は使用可能なだけではなく、さ らに安定していて速いものになっています。「PPP」(モデムを使ってインター ネット接続を行うプロトコル) がそれにあたります。カーネルが PPP をサポー トしていることと、電話をかけて接続をするツールが必要です。 <!-- To retrieve your mail from the ISP's server you need a tool called ``email fetcher'' that uses the POP protocol; when the mail is fetched it will appear as though it had been directly delivered to your Linux box. You'll then use a MUA (Mail User Agent) like <tt>pine</tt>, <tt>mutt</tt>, <tt>elm</tt> or many others to manage it. --> プロバイダのサーバからあなたのメールを取って来るには、POP プロトコル を使用する「email fetcher」と呼ばれるツールが必要です。メールが取り込 まれたときには、あたかもあなたの Linux box に直接メールが届けられたよ うに見えます。それから <tt>pine</tt> や <tt>mutt</tt>、<tt>elm</tt> 等 多くの MUA(Mail User Agent) を使用してメールを管理します。 <!-- While under Windows the dialer is automatically invoked when you launch an Internet application, under Linux the path is the other way round: you dial first, then launch the application. A thing called <tt>diald</tt> provides the usual behaviour. Installing and configuring dialup networking used to be one of the most difficult things to do under Linux, but not anymore: please consult the Configuration HOWTO. --> Windows ではダイアラがインターネットアプリケーションを起動したときに 自動的に起動しますが、Linux ではその逆になります。最初にダイアルして、 それからアプリケーションを起動します。<tt>diald</tt> と呼ばれるものが 普通この動作を提供します。ダイアルアップネットワークのインストールと 設定をすることは Linux で達成するのがもっとも難しいと言われていました が、今はもう違います。Configuration HOWTO を参照してみてください。 <!-- Finally, a word about ``Network neighborhood'': you can make your Linux workstation appear as Windows NT/9x in a local network of Windows machines! The magic word is Samba: not the lively Brazilian dance, but an implementation of the SMB protocol for Linux. Go to <url url="http://samba.anu.edu.au/samba">. --> 最後に 「ネットワークコンピュータ」について。あなたの Linux ワークステー ション を Windows で組まれたローカルネットワーク上で Windows NT/9x の ように見せかけることができます! この魔法の合い言葉は Samba です。これ はブラジルのダンスではなく、Linux のための SMB プロトコルを実行するものです。 <url url="http://samba.anu.edu.au/samba"> (日本 Samba ユーザ会 If all you need is setting the PATH and other: <url url="http://www.samba.gr.jp">) に行ってみましょう。 <sect> <!-- A Bit of Programming--> ちょっとだけプログラミング <sect1> シェルスクリプト: バッチファイルの強化版 <label id="Shell Scripts"> <p> <!-- If you used .BAT files to create shortcuts of long command lines (I did a lot), this goal can be attained by inserting appropriate alias lines (see example above) in <tt/profile/ or <tt/.bash_profile/. But if your .BATs were more complicated, then you'll love the scripting language made available by the shell: it's as powerful as good ol' QBasic, if not more. It has variables, structures like while, for, case, if... then... else, and lots of other features: it can be a good alternative to a ``real'' programming language. --> DOS を利用していたとき長いコマンドラインのショートカットを作るためにバッ チファイルを使用していたなら (私もよくしました)、同じ目的は適切なエイ リアスを<tt/profile/ や <tt/.bash_profile/ に記述することで達成できま す (上の例を参照)。 でも、もっと複雑なバッチファイルを使っていたならシェ ルによるスクリプト言語をきっとあなたは好きになるはずです。これは古き良 き QBasic と同じか、それ以上にパワフルです。これは変数や while、for、 case、if... then... else のような構造を持ち、そのほかにもたくさんの特 徴があります。これは「本物」のプログラミング言語の代わりになります。 <!-- To write a script the equivalent of a .BAT file under DOS all you have to do is write a standard ASCII file containing the instructions, save it, then make it executable with the command <tt/chmod +x <scriptfile>/. To execute it, type its name. --> スクリプト (DOS 上の .BAT に相当) を書くには、命令を含んだ標準の ASCII ファイルを記述し、セーブします。その後 <tt/chmod +x <scriptfile>/ コマンドで実行可能にすればよいだけです。スクリプトを実行するにはファ イル名をタイプしてください。 <!-- A word of warning. The system editor is called <tt/vi/, and in my experience most new users find it very difficult to use. I'm not going to explain how to use it; please consult Matt Welsh's book or search for a tutorial on the net. Suffice it here to say that: --> 注意! <tt/vi/ と呼ばれるシステムエディタがありますが、これは私の経験か ら言って初心者の方には使うのがとても難しいと感じると思います。ここでは 使い方などは説明しませんが、Matt Welsh の本やネットでチュートリアルを 探してそれらを参考にしてください。ここでは以下の説明にとどめておきます。 <itemize> <item> <!-- to insert some text, type <tt>i</tt> then your text;--> テキストを挿入するには <tt>i</tt> とタイプしてから <item> <!--to delete characters, type <ESC> then <tt>x</tt>;--> 文字を削除するには <ESC> の後に <tt>x</tt> とタイプ <item> <!--to quit <tt/vi/ whithout saving, type <ESC> then <tt/:q!/--> セーブしないで終了するには <ESC> の後に <tt/:q!/ とタイプ <item> <!-- to save and quit, type <ESC> then <tt/:wq/.--> セーブしてから終了するには <ESC> の後に <tt/:wq/ とタイプ </itemize> <!-- A good beginner editor is <tt>joe</tt>: invoking it by typing <tt/jstar/ you'll get the same key bindings as the DOSWin editor. <tt>jed</tt> in WordStar or IDE mode is even better. Please consult Section <ref id="Programs" name="Where to Find Applications"> to see where to get these editors. --> 初心者向けのよいエディタに <tt>joe</tt> があります。<tt/jstar/ と タイプすることで起動でき、これは DOSWin のエディタと同じキーバインディ ングを持ちます。<tt>jed</tt> の WordStar や IDE モードはさらによいです。 <ref id="Programs" name="どこでアプリケーションを見付けるか"> のセクショ ンで、どこからこれらのエディタをダウンロードできるか見付けてください。 <!-- Writing scripts under <tt/bash/ is such a vast subject it would require a book by itself, and I will not delve into the topic any further. I'll just give you an example of shell script, from which you can extract some basic rules: --> <tt/bash/ 上でのスクリプト記述はとても幅の広いサブジェクトであり、それ だけで本が書けてしまえますので、これ以上は深入りしません。ここでは単純 に基本となるルールを覚えてもらうためにシェルスクリプトの例を挙げること にしま す: <!-- #!/bin/sh # sample.sh # I am a comment # don't change the first line, it must be there echo "This system is: `uname -a`" # use the output of the command echo "My name is $0" # built-in variables echo "You gave me the following $# parameters: "$* echo "The first parameter is: "$1 echo -n "What's your name? " ; read your_name echo notice the difference: "hi $your_name" # quoting with " echo notice the difference: 'hi $your_name' # quoting with ' DIRS=0 ; FILES=0 for file in `ls .` ; do if [ -d ${file} ] ; then # if file is a directory DIRS=`expr $DIRS + 1` # DIRS = DIRS + 1 elif [ -f ${file} ] ; then FILES=`expr $FILES + 1` fi case ${file} in *.gif|*jpg) echo "${file}: graphic file" ;; *.txt|*.tex) echo "${file}: text file" ;; *.c|*.f|*.for) echo "${file}: source file" ;; *) echo "${file}: generic file" ;; esac done echo "there are ${DIRS} directories and ${FILES} files" ls | grep "ZxY !!!WKW" if [ $? != 0 ] ; then # exit code of last command echo "ZxY !!!WKW not found" fi echo "enough... type 'man bash' if you want more info." --> <code> #!/bin/sh # sample.sh # これはコメント # 一行目を編集しないように。それはそこにある必要があります。 echo "このシステムは:" `uname -a` # コマンドの出力を使う echo "私の名前は $0" # 組込みの変数 echo "あなたは次の" $# "パラメータを与えました: "$* echo "最初のパラメータは: "$1 echo -n "あなたの名前は? " ; read your_name echo 違いに気づきますか: "hi $your_name" # " で引用 echo 違いに気づきますか: 'hi $your_name' # ' で引用 DIRS=0 ; FILES=0 for file in `ls .` ; do if [ -d ${file} ] ; then # ファイルがディレクトリなら DIRS=`expr $DIRS + 1` # DIRS = DIRS + 1 elif [ -f ${file} ] ; then FILES=`expr $FILES + 1` fi case ${file} in *.gif|*jpg) echo "${file}: 画像ファイル" ;; *.txt|*.tex) echo "${file}: テキストファイル" ;; *.c|*.f|*.for) echo "${file}: ソースファイル" ;; *) echo "${file}: 一般的なファイル" ;; esac done echo " ${DIRS} 個のディレクトリと ${FILES} 個のファイルが見付かりました" ls | grep "ZxY--!!!WKW" if [ $? != 0 ] ; then # コードの最後のコマンドから exit する echo "ZxY--!!!WKW not found" fi echo "これで十分かな。。さらなる情報は 'man bash'" </code> <sect1> <!-- C for Yourself --> C 言語をあなたに <p> <!-- Under UNIX, the system language is C, love it or hate it. Scores of other languages (Java, FORTRAN, Pascal, Lisp, Basic, Perl, awk...) are also available. --> 好む好まざるとを問わず、UNIX 上でのシステム言語は C です。ほかにもたく さんの言語 (Java、FORTRAN、Pascal、Lisp、Basic、Perl、awk...) が使用可 能です。 <!-- Taken for granted that you know C, here are a couple of guidelines for those of you who have been spoilt by Turbo C++ or one of its DOS kin. Linux's C compiler is called <tt/gcc/ and lacks all the bells and whistles that usually accompany its DOS counterparts: no IDE, on-line help, integrated debugger, etc. It's just a rough command-line compiler, very powerful and efficient. To compile your standard <tt/hello.c/ you'll do: --> あなたが C を知っているものとして、これらは今まで Turbo C++ やそれら DOS 用のコンパイラを使ってきた人へのガイドラインです。Linux の C コンパイラは <tt/gcc/ と呼ばれ、これはベルや笛などの DOS のもので 通常付属されている機能を欠きます。IDE、オンラインヘルプ、統合された デバッガなどもありません。単純なコマンドラインのコンパイラですが とても強力で有能です。標準の <tt/hello.c/ をコンパイルするには: <tscreen><verb> $ gcc hello.c </verb></tscreen> <!-- which will create an executable file called <tt/a.out/. To give the executable a different name, do --> これで実行ファイル <tt/a.out/ を作成します。実行ファイルに違う名前を与 えるには <tscreen><verb> $ gcc -o hola hello.c </verb></tscreen> <!-- To link a library against a program, add the switch -l<libname>. For example, to link in the math library: --> ライブラリをプログラムにリンクするには、-l<libname> のようなスイッ チを追加します。例えば数学ライブラリをリンクするには <tscreen><verb> $ gcc -o mathprog mathprog.c -lm </verb></tscreen> <!-- (The <tt>-l<libname></tt> switch forces <tt/gcc/ to link the library <tt>/usr/lib/lib<libname>.so</tt>; so <tt/-lm/ links <tt>/usr/lib/libm.so</tt>). --> (<tt>-l<libname></tt> スイッチは <tt/gcc/ にライブラリ <tt>/usr/lib/lib<libname>.so</tt> をリンクさせます。つまり <tt/-lm/ は <tt>/usr/lib/libm.so</tt> をリンクします) <!-- So far, so good. But when your prog is made of several source files, you'll need to use the utility <tt/make/. Let's suppose you have written an expression parser: its source file is called <tt/parser.c/ and #includes two header files, <tt/parser.h/ and <tt/xy.h/. Then you want to use the routines in <tt/parser.c/ in a program, say, <tt/calc.c/, which in turn #includes <tt/parser.h/. What a mess! What do you have to do to compile <tt/calc.c/? --> ここまではいい感じですね。でもプログラムが複数のソースファイルに よってできている場合は、<tt/make/ というユーティリティを使う必要があり ます。仮にあなたが式の構文解析をするプログラムを書いたとします。 これのソースファイルには <tt/parser.c/ と #include される二つの ヘッダファイル、<tt/parser.h/ と <tt/xy.h/ があります。 <tt/parser.c/ にあるルーチンを <tt/parser.h/ を #include する <tt/calc.c/ で使い たいとします。なんてめちゃくちゃな! どうやったら <tt/calc.c/ をコンパ イルできるのでしょう? <!-- You'll have to write a so-called <tt/Makefile/, which teaches the compiler the dependencies between sources and objects files. In our example: --> そこで、コンパイラにソースとオブジェクトファイル間の依存状況を 教える <tt/Makefile/ と呼ばれるものを書かなければなりません。 <!-- # This is Makefile, used to compile calc.c # Press the <TAB> key where indicated! calc: calc.o parser.o <TAB>gcc -o calc calc.o parser.o -lm # calc depends on two object files: calc.o and parser.o calc.o: calc.c parser.h <TAB>gcc -c calc.c # calc.o depends on two source files parser.o: parser.c parser.h xy.h <TAB>gcc -c parser.c # parser.o depends on three source files # end of Makefile. --> <code> # これは calc.c をコンパイルするための Makefile # 示されたところで <TAB> キーを押すように calc: calc.o parser.o <TAB>gcc -o calc calc.o parser.o -lm # calc は二つのオブジェクトファイルに依存します: calc.o と parser.o calc.o: calc.c parser.h <TAB>gcc -c calc.c # calc.o は二つのソースファイルに依存します parser.o: parser.c parser.h xy.h <TAB>gcc -c parser.c # parser.o は三つのソースファイルに依存します # Makefile 終了 </code> <!-- Save this file as <tt/Makefile/ and type <tt/make/ to compile your program; alternatively, save it as <tt/calc.mak/ and type <tt/make -f calc.mak/, and of course RMP. You can invoke some help about the C functions, that are covered by man pages, section 3; for example, --> このファイルを <tt/Makefile/ という名前で保存し、プログラムをコンパイ ルするために <tt/make/ とタイプしましょう。そのほかの手段として、 <tt/calc.mak/ という名前で保存し、<tt/make -f calc.mak/ とタイプするこ ともできます。そしてこれはもちろん RMP してみてください。 man に載って いる C 関数についての情報を使用することもできます。例えばセクション 3 だったら以下のようにします。 <tscreen><verb> $ man 3 printf </verb></tscreen> <!-- To debug your programs, use <tt>gdb</tt>. <tt>info gdb</tt> to learn how to use it. --> プログラムをデバッグするには <tt>gdb</tt> を使いましょう。使い方は <tt>info gdb</tt> で学びましょう。 <!-- There are lots of libraries available; among the first you'll want to use are <tt/ncurses/ (textmode effects), and <tt/svgalib/ (console graphics). If you feel brave enough to tackle X11 programming (it's not that difficult), there are several libraries that make writing X11 programs a breeze. Have a look at <url url="http://www.xnet.com/~blatura/linapp6.html">, bearing in mind that Gtk is becoming a Linux standard. --> Linux ではたくさんのライブラリが使用可能です。この中でも <tt/ncurses/ (テキスト効果)、そして <tt/svgalib/ (コンソールグラフィックス) を最初 に使ってみたくなるでしょう。もしあなたに勇気があれば X11 プログラミン グに挑戦してみるのも悪くないかもしれません (そんなには難しくありません)。 X11 プログラム記述を簡単にする複数のライブラリがあります。<url url="http://www.xnet.com/~blatura/linapp6.html"> を見てみてください。で も Gtk が Linux 標準になって来ていることを忘れずに。 <!-- Many editors can act as an IDE; <tt/emacs/ and <tt/jed/, for instance, also feature syntax highlighting, automatic indent, and so on. Alternatively, get the package <tt/rhide/ from <url url="ftp://sunsite.unc.edu:/pub/Linux/devel/debuggers/">. It's a Borland IDE clone, and chances are that you'll like it. --> たくさんのエディタは IDE となることもできます。例えば <tt/emacs/ と <tt/jed/ には文章構成ハイライト、自動インデント、といったたくさんの 機能があります。ほかの方法として、<url url="ftp://sunsite.unc.edu:/pub/Linux/devel/debuggers/">. から <tt/rhide/ パッケージを入手してみるのもいいかもしれません。 これは Borland IDE のクローンで、あなたも気に入ると思います。 <sect> <!-- The Remaining 1% --> 残りの 1% <p> <!-- Much more than 1%, actually... --> 実際にはとても 1% ではすみませんが…… <sect1> <!-- Using tar and gzip --> tar と gzip を使う <p> <!-- Under UNIX there are some widely used applications to archive and compress files. <tt/tar/ is used to make archives-it's like <tt/PKZIP/ or <tt>Winzip</tt>but it doesn't compress, it only archives. To make a new archive: --> UNIX 上ではファイルをまとめたり(アーカイブ、書庫)、圧縮するのに、 よく使われるアプリケーションがあります。<tt/tar/ は書庫を作成するのに 使われます。これは <tt/PKZIP/ や <tt>Winzip</tt> に似ていますが、圧縮 は行わず、ファイルをまとめて書庫を作るのみです。新しいアーカイブを作る には: <tscreen><verb> $ tar -cvf <archive_name.tar> <file> [file...] </verb></tscreen> <!-- To extract files from an archive: --> アーカイブからファイルを抽出するには: <tscreen><verb> $ tar -xpvf <archive_name.tar> [file...] </verb></tscreen> <!-- To list the contents of an archive: --> アーカイブの内容を参照するには: <tscreen><verb> $ tar -tf <archive_name.tar> | less </verb></tscreen> <!-- You can compress files using <tt/compress/, which is obsolete and shouldn't be used any more, or <tt/gzip/: --> ファイルを圧縮するには <tt/compress/ (もう古いので使わ ないべき) か、<tt/gzip/ が使えます: <tscreen><verb> $ compress <file> $ gzip <file> </verb></tscreen> <!-- that creates a compressed file with extension <tt/.Z/ (<tt/compress/) or <tt/.gz/ (<tt/gzip/). These programs can compress only one file at a time. To decompress: --> これで拡張子 <tt/.Z/ (<tt/compress/) や <tt/.gz/ (<tt/gzip/) のついた圧縮ファイルが作成されます。これらのプログラムは一回にひとつの ファイルしか圧縮できません。ファイルを解凍するには: <tscreen><verb> $ compress -d <file.Z> $ gzip -d <file.gz> </verb></tscreen> RMP。 <!-- There are also the <tt/unarj/, <tt/zip/ and <tt/unzip/ (PK??ZIP compatible) utilities. Files with extension <tt/.tar.gz/ or <tt/.tgz/ (archived with <tt/tar/, then compressed with <tt/gzip/) are as common in the UNIX world as .ZIP files are under DOS. Here's how to list the contents of a <tt/ .tar.gz/ archive: --> そのほかにも <tt/unarj/、<tt/zip/ や <tt/unzip/ (PK??ZIP 互換) といったユーティリティがあります。<tt/.tar.gz/ や <tt/.tgz/ (<tt/tar/ でアーカイブされて、<tt/gzip/ で圧縮されたもの)といった拡張子の ファイルは UNIX の世界では DOS でいう .ZIP ファイルと同じくらい 一般的に使われます。<tt/.tar.gz/ アーカイブの内容を参照するには: <tscreen><verb> $ tar -ztf <file.tar.gz> | less </verb></tscreen> <sect1> <!-- Installing Applications --> アプリケーションのインストール <label id="Install"> <p> <!-- First of all: installing packages is root's work. Most Linux applications are distributed as a <tt/.tar.gz/ archive, which typically will contain a directory aptly named containing files and/or subdirectories. A good rule is to install these packages from <tt>/usr/local</tt> with the command --> まず最初に: パッケージのインストールは root の役目です。ほとんどの Linux のアプリケーションは <tt/.tar.gz/ アーカイブで配布され、 それらのアーカイブには適切な名前のついたディレクトリがひとつ入っており、 そのディレクトリ内には各種ファイルやサブディレクトリが入っています。 これらのパッケージをインストールする上での決まりは、以下のコマンド を使って <tt>/usr/local</tt> 配下にインストールすることです。 <tscreen><verb> # tar -zxf <archive.tar.gz> </verb></tscreen> <!-- reading then the README or INSTALL file. In most cases, the application is distributed in source, which you'll have to compile; often, typing <tt/make/ then <tt>make install</tt> will suffice. If the archive contains a <tt>configure</tt> script, run it first. Obviously, you'll need the <tt/gcc/ or <tt/g++/ compiler. --> その後 README や INSTALL ファイルを読みましょう。ほとんどの場合アプリケー ションはソースで配布されているので、コンパイルする必要があります。 ほとんどの場合 <tt/make/ そして、<tt>make install</tt> とタイプする だけでよいでしょう。もしアーカイブが <tt>configure</tt> スクリプトを含 んでいる場合それを先に実行しましょう。当然ですが、これらには <tt/gcc/ や <tt/g++/ コンパイラが必要です。 <!-- Other archives have to be unpacked from <file>/</file>; this is the case with Slackware's <tt/.tgz/ archives. Other archives contain the files but not a subdirectory - careful not to mess things up!. Always list the contents of the archive before installing it. --> ほかのアーカイブは <file>/</file> からアンパックする必要があります。 Slackware の <tt/.tgz/ アーカイブの場合です。そのほかのアーカイブはファイル を含んでも、サブディレクトリを含まない場合があります。システムをめちゃ くちゃにしないように気を付けましょう! インストールをするまえに、 常にアーカイブの内容を参照するようにしましょう。 <!-- Debian and Red Hat have their own archive format; respectively, <tt/.deb/ and <tt/.rpm/. The latter is gaining wide acceptance; to install an <tt/rpm/ package, type --> Debian と Red Hat は独自のアーカイブ形式を持っています。 それぞれ <tt/.deb/ と <tt/.rpm/。後者は広く使われ始めています。 <tt/rpm/ パッケージをインストールするには <tscreen><verb> # rpm -i package.rpm </verb></tscreen> とタイプします。 <sect1> <!-- Tips You Can't Do Without --> 知っておくべきヒント <p> <!-- <bf/Backscrolling/: pressing <SHIFT + PAGEUP> (the grey key) allows you to backscroll a few pages, depending on how much video memory you have. --> <bf/バックスクロール/: <SHIFT + PAGEUP> (灰色のキー) を押すことで ページをバックスクロールさせることができます (どのくらいできるかはあ なたのビデオカードのメモリに左右されます)。 <!-- <bf/Resetting the screen/: if you happen to <tt/more/ or <tt/cat/ a binary file, your screen may end up full of garbage. To fix it, blind type <tt/reset/ or this sequence of characters: <tt/echo CTRL-V ESC c RETURN/. --> <bf/画面のリセット/: もしバイナリファイルを <tt/more/ や <tt/cat/ してしまった場合、画面がめちゃくちゃになってしまうかもしれません。 これを修正するには、<tt/reset/ とブラインドタイプするか、次のように タイプしてください: <tt/echo CTRL-V ESC c RETURN/。 <!-- <bf/Pasting text/: in console, see below; in X, click and drag to select the text in an <tt/xterm/ window, then click the middle button (or the two buttons together if you have a two-button mouse) to paste. There is also <tt/xclipboard/ (alas, only for text); don't get confused by its very slow response. --> <bf/テキストのペースト/: コンソール上では下を参照; X 上ではクリック アンドドラッグで <tt/xterm/ 上のテキストを選択し、中央ボタン( 2 ボタンマウスの場合は二つのボタンを同時に押す)をクリックすることで テキストのペーストができます。そのほかにも <tt/xclipboard/ (残念ながらテキストのみ) があります。とても遅い反応に混乱しないでください。 <!-- <bf/Using the mouse/: if you installed <tt/gpm/, a mouse driver for the console, you can click and drag to select text, then right click to paste the selected text. It works across different VCs. --> <bf/マウスを使う/: もし <tt/gpm/ 、コンソール用マウスドライバ、 をインストールしてある場合、クリックアンドドラッグでテキストを選択して、 右クリックで選択したテキストをペーストできます。 これは異なった仮想コンソール間でも働きます。 <!-- <bf/Messages from the kernel/: have a look at <tt>/var/adm/messages</tt> or <tt>/var/log/messages</tt> as root to see what the kernel has to tell you, including bootup messages. The command <tt/dmesg/ is also handy. --> <bf/カーネルからのメッセージ/: <tt>/var/adm/messages</tt> や <tt>/var/log/messages</tt> を root 権限で参照することでブートアップ メッセージを含めたカーネルからのメッセージを読むことができます。 <tt/dmesg/ コマンドも便利です。 <sect1> <!--Where to Find Applications--> どこでアプリケーションを見付けるか <label id="Programs"> <p> <!-- If you're wondering whether you can replace your old and trusted DOS/Win application with a Linux one, I suggest that you browse the main Linux software repositories: --> もしあなたが古き良き DOS/Win アプリケーションを Linux のものと 交換できるかどうか悩んでいるなら、Linux ソフトウェアリポジトリを 見てみることを勧めます。 <url url="ftp://sunsite.unc.edu/pub/Linux">、 <url url="ftp://tsx-11.mit.edu/pub/linux"> や、 <url url="ftp://ftp.funet.fi/pub/Linux">。 <!-- Other good starting places are the ``Linux Applications and Utilities Page'' <url url="http://www.xnet.com/~blatura/linapps.shtml">, and the ``official'' Linux page <url url="http://www.linux.org">. --> そのほか始めるのによい場所は 「Linux Applications and Utilities Page」 <url url="http://www.xnet.com/~blatura/linapps.shtml"> や、 「公式」 Linux ページ <url url="http://www.linux.org"> です (日本では 「日本の Linux 情報」ページ<url url="http://www.linux.or.jp">)。 <sect1> <!-- A Few Things You Couldn't Do --> DOS/Win ではできなかったこと <p> <!-- Linux can do an awful lot of things that were cumbersome, difficult or impossible do to with DOS/Windows. Here's a short list that may whet your appetite: --> Linux では DOS/Windows では面倒、難しかった、または不可能だった 無数のことができます。以下はあなたの欲求を満たしてくれるかも しれないもののリストです。 <itemize> <item> <!--<tt/at/ allows you to run programs at a specified time;--> <tt/at/ は指定した時間にプログラムを実行します。 <item> <!-- <tt/awk/ is a simple yet powerful language to manipulate data files (and not only). For example, being <tt/data.dat/ your multi field data file, --> <tt/awk/ は単純ながらもパワフルな、データファイルを扱う言語です (それだけではありません)。例えば <tt/data.dat/ が マルチフィールドデータファイルの場合、 <tscreen><verb> $ awk '$2 ~ "abc" {print $1, "\t", $4}' data.dat </verb></tscreen> <!-- prints out fields 1 and 4 of every line in <tt/data.dat/ whose second field contains ``abc''. --> <tt/data.dat/ 内の全ての行の 2 番目のフィールドが 「abc」 を含む 1 番目と 4 番目のフィールドの内容を表示します。 <item> <!-- <tt/cron/ is useful to perform tasks periodically, at specified date and time. Type <tt/man 5 crontab/.--> <tt/cron/ は指定した日付時間に定期的にタスクを実行する のに使えます。<tt/man 5 crontab/ とタイプ。 <item> <!-- <tt/file <filename>/ tells you what <tt/filename/ is (ASCII text, executable, archive, etc.);--> <tt/file <filename>/ は <tt/filename/ が何か教えてくれます (ASCII テキスト、実行ファイル、アーカイブ、その他)。 <item><!-- <tt/find/ (see also Section <ref id="Directories: Trans" name="Directories: Translating Commands">) is one of the most powerful and useful commands. It's used to find files that match several characteristics and perform actions on them. General use of <tt/find/ is:--> <tt/find/ (セクション <ref id="Directories : Trans" name="ディレクトリ: コマンドを翻訳する"> を参照) は非常にパワフルで便利なコマンドです。 このコマンドはファイルを複数の特徴にマッチ させることで捜し出し、それに対して動作を行います。 一般的な <tt/find/ の使い方は <tscreen><verb> $ find <directory> <expression> </verb></tscreen> <!-- where <expression> includes search criteria and actions. Examples: --> <expression> は検索基準と動作を含みます。例えば: <tscreen><verb> $ find . -type l -exec ls -l {} \; </verb></tscreen> <!-- finds all the files that are symbolic links and shows what they point to. --> 全てのシンボリックリンクとそれらの指し示す場所を表示します。 <tscreen><verb> $ find / -name "*.old" -ok rm {} \; </verb></tscreen> <!-- finds all the files matching the pattern and deletes them, asking for your permission first. --> パターンにマッチする全てのファイルを見付けてそれらを削除します。 削除するまえに、本当に削除してよいか聞きます。 <tscreen><verb> $ find . -perm +111 </verb></tscreen> <!-- finds all the files whose permissions match 111 (executable). --> パーミッションが 111 (実行ファイル) のファイルを探します。 <tscreen><verb> $ find . -user root </verb></tscreen> <!-- finds all the files that belong to root. Lots of possibilities here - RMP. --> root の所有する全てのファイルを探します。たくさんの可能性がありますね --- RMP。 <item> <!-- <tt/grep/ finds text patterns in files. For example,--> <tt/grep/ はパターンにマッチするファイル内のテキストを探します。 例えば、 <tscreen><verb> $ grep -l "geology" *.tex </verb></tscreen> <!-- lists the files *.tex that contain the word ``geology''. The variant <tt/zgrep/ works on gzipped files. RMP; --> 「geology」 という単語を含む、*.tex ファイルをリストします。 相違した <tt/zgrep/ は gzip されたファイルに働きます。 RPM; <item> <!-- <bf/regular expressions/ are a complex but darn powerful way of performing search operations on text. For example, <tt>^a[^a-m]X{4,}txt$</tt> matches a line that starts with `a', followed by any character except those in the interval a-m, followed by 4 or more `X', and ends in `txt'. You use regular expressions with advanced editors, <tt>less</tt>, and many other applications. <tt>man grep</tt> for an introduction. --> <bf/正規表現/ は複雑ですが、テキストの検索を行う、とてもパワフルな やり方です。例えば、<tt>^a[^a-m]X{4,}txt$</tt> は a で始まる行で それに続く文字列が a から m ではなく、その次の文字が、4 つ以上の X で、txt で終わるものに該当します。正規表現は発達したエディタや、 <tt>less</tt>、そのほかたくさんのアプリケーションと合わせて使用します。 <tt>man grep</tt> をイントロダクションにしてください。 <item> <!-- <tt/script <script_file>/ dumps the screen contents on <tt/script_file/ until you issue the command <tt/exit/. Useful for debugging; --> <tt/script <script_file>/ は画面の内容を <tt/exit/ コマンド を実行するまで、<tt/script_file/ にダンプします。デバッグするときに 使えます。 <item> <!-- <tt/sudo/ allows users to perform some of root's tasks (e.g. formatting and mounting disks; RMP); --> <tt/sudo/ は一般ユーザに root のタスクの一部を 実行することを許可します。 (例: ディスクのフォーマットやマウント; RMP) <item> <!-- <tt/uname -a/ gives you info about your system;--> <tt/uname -a/ はあなたのシステム情報を教えてくれます。 <item> <!-- <tt/zcat/ and <tt/zless/ are useful for browsing and piping gzipped files without decompressing them. For example: --> <tt/zcat/ と <tt/zless/ は gzip されたファイルを解凍しないでブラウズし たりパイプを使ったりできます。例えば: <tscreen><verb> $ zless textfile.gz $ zcat textfile.gz | lpr </verb></tscreen> <item> <!-- The following commands often come in handy: <tt>bc, cal, chsh, cmp, cut, fmt, head, hexdump, nl, passwd, printf, sort, split, strings, tac, tail, tee, touch, uniq, w, wall, wc, whereis, write, xargs, znew.</tt> RMP. --> 次のコマンドはよく役に立ちます: <tt>bc、cal、chsh、cmp、 cut、fmt、head、hexdump、nl、passwd、printf、sort、split、 strings、tac、tail、tee、touch、uniq、w、wall、wc、whereis、write、 xargs、znew。 </tt> RMP。 </itemize> <sect1> <!-- Practicing UNIX under DOS/Windows --> DOS/Windows 上で UNIX を体験 <p> <!-- Believe it or not, there are fine tools that provide a UNIX-like environment under DOS/Windows! One is the Djgpp suite (<url url="http://www.delorie.com/djgpp">) for DOS, while Cygnus (<url url="http://www.cygnus.com">) is a more complex port for Win32. Both include the same GNU development tools and utilities as Linux; you won't get the same stability and performance, though. --> 信じられないかもしれませんが、DOS/Windows 上で UNIX のような環境を 提供する素晴らしいツールがあります! ひとつは DOS 用の Djgpp (<url url="http://www.delorie.com/djgpp">)、さらに Cygnus (<url url="http://www.cygnus.com">) はさらに複雑な Win32 用です。両方とも 同じ GNU 開発ツールやユーティリティを含みますが、両方とも同じ程度の 安定性やパフォーマンスという訳でもありません。 <!-- If you'd like to have a taste of Linux, try out Djgpp. Download and install the following files (as of this writing, the latest version is 2.02): <tt>djdev202.zip, bnu281b.zip, bsh1147b.zip, fil316b.zip, find41b.zip, grep22b.zip, gwk303b.zip, lss332b.zip, shl112b.zip.</tt>. Installation instructions are provided, and you can find assistance on <url url="news:comp.os.msdos.djgpp">. --> もしあなたが Linux を味見してみたいなら Djgpp を試してみましょう。次のファイル をダウンロード、インストールします (本文筆記時点で最新バージョンは 2.02)。<tt>djdev202.zip、bnu281b.zip、bsh1147b.zip、fil316b.zip、 find41b.zip、grep22b.zip、gwk303b.zip、lss332b.zip、shl112b.zip。</tt> インストール 方法は提供されています。さらに <url url="news:comp.os.msdos.djgpp"> で 助力をもらえます。 <!-- In particular, using <tt>bash</tt> under DOSWin is a whiff of fresh air. To configure it properly, edit the supplied file <tt>BOOT.BAT</tt> to reflect your installation, then put these files in your home directory (in the Windows partition) instead of those provided: --> 特に <tt>bash</tt> を DOSWin 上で使うときは新鮮な体験です。 きちんと設定するには、自分の環境を反映させるため 提供されている <tt>BOOT.BAT</tt> を編集し、 以下のファイルをホームディレクトリ(Windows パーティション内) に元からあるものの 代わりに置きましょう。 <!-- # this is _bashrc LS_OPTIONS="-F -s -color=yes" alias cp='cp -i' alias d='ls -l' alias l=less alias ls="ls $LS_OPTIONS" alias mv='mv -i' alias rm='rm -i' alias u='cd ..' </verb></tscreen> <tscreen><verb> # this is _bprof if [ -f ~/_bashrc ]; then . ~/_bashrc fi PS1='\w\$ ' PS2='> ' CDPATH="$CDPATH:~" # stuff for less(1) LESS="-M-Q" # long prompt, silent LESSEDIT="%E ?lt+%lt. %f" # edit top line VISUAL="jed" # editor LESSCHARSET=latin1 # visualise accented letters export PS1 PS2 CDPATH LS_OPTIONS LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET --> <tscreen><verb> # これは _bashrc LS_OPTIONS="-F -s --color=yes" alias cp='cp -i' alias d='ls -l' alias l=less alias ls="ls $LS_OPTIONS" alias mv='mv -i' alias rm='rm -i' alias u='cd ..' </verb></tscreen> <tscreen><verb> # これは _bprof if [ -f ~/_bashrc ]; then . ~/_bashrc fi PS1='\w\$ ' PS2='> ' CDPATH="$CDPATH:~" # less(1) のためのもの LESS="-M-Q" # 冗長なプロンプト、ベルを鳴らさない LESSEDIT="%E ?lt+%lt. %f" # 一番上の行を編集 VISUAL="jed" # エディタ LESSCHARSET=latin1 # 強調文字を見えるようにする export PS1 PS2 CDPATH LS_OPTIONS LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET </verb></tscreen> <sect1> <!-- Common Extensions and Related Programs --> よく使われる拡張子と関連するプログラム <p> <!-- You may come across scores of file extensions. Excluding the more exotic ones (i.e. fonts, etc.), here's a list of who's what: --> これからあなたはたくさんの拡張子に出会うと思います。 風変わりなものは含めていませんが、これはどの拡張子がついたファイル が何かのリストです。 <itemize> <item> <!-- <tt/1 ... 8/: man pages. Read them with <tt>groff -Tascii -man <file.1></tt>. --> <tt/1 〜 8/: man ページ。<tt>groff -Tascii -man <file.1></tt> で読みます。 <item><!-- <tt/arj/: archive made with <tt/arj/.--> <tt/arj/: <tt/arj/ で作成されたアーカイブ。 <item> <!-- <tt/dvi/: output file produced by TeX (see below). <tt/xdvi/ to visualise it; <tt/dvips/ to turn it into a PostScript <tt/.ps/ file.--> <tt/dvi/: Tex (下を参照)によって作成された出力ファイル。 <tt/xdvi/ で見ます。<tt/dvips/ で PostScript <tt/.ps/ ファイル に変換します。 <item> <!-- <tt/gz/: archive made with <tt/gzip/.--> <tt/gz/: <tt/gzip/ によって作成されたアーカイブ。 <item><!-- <tt/info/: info file (sort of alternative to man pages). Get <tt/info/.--> <tt/info/: info ファイル (man ページのようなもの)。Get <tt/info/。 <item> <!-- <tt/lsm/: Linux Software Map file. It's a plain ASCII file containing the description of a package.--> <tt/lsm/: Linux ソフトウェアマップファイル。これはパッケージの説明を含 んだ普通の ASCII ファイルです。 <item> <!-- <tt/ps/: PostScript file. To visualise or print it get <tt/gs/ and, optionally, <tt/ghostview/ or <tt/gv/.--> <tt/ps/: PostScript ファイル。見たり、プリントしたりするには <tt/gs/ とそのほかにも <tt/ghostview/ や <tt/gv/ を使います。 <item><!-- <tt/rpm/: Red Hat package. You can install it on any system using the package manager <tt/rpm/.--> <tt/rpm/: Red Hat パッケージ。パッケージマネージャ <tt/rpm/ を使うこと でどんなシステムにでもインストールできます。 <item><!-- <tt/taz, tar.Z/: archive made with <tt/tar/ and compressed with <tt/compress/.--> <tt/taz、tar.Z/: <tt/tar/ で書庫にされ、<tt/compress/ で圧縮された アーカイブ。 <item> <!-- <tt/tgz, tar.gz/: archive made with <tt/tar/ and compressed with <tt/gzip/.--> <tt/tgz、tar.gz/: <tt/tar/ で書庫にされ、<tt/gzip/ で圧縮されたアーカ イブ。 <item> <!-- <tt/tex/: text file to submit to TeX, a powerful typesetting system. Get the package <tt/tex/, available in many distributions.--> <tt/tex/: パワフルな文書整形システム TeX に読み込ませる テキストファイル。 パッケージ <tt/tex/ を入手しましょう。たくさんのディストリビューション で入手可能です。 <item> <!-- <tt/texi/: texinfo file, can produce both TeX and info files (cp. <tt/info/). Get <tt/texinfo/.--> <tt/texi/: texinfo ファイル、TeX と info ファイルの両方を作成します。 (cp. <tt/info/)。Get <tt/texinfo/。 <item><!-- <tt/xbm, xpm, xwd/: graphic file.--> <tt/xbm、xpm、xwd/: グラフィックファイル。 <item> <!-- <tt/Z/: archive made with <tt/compress/.--> <tt/Z/: <tt/compress/ によって作成されたアーカイブ。 </itemize> <sect1> <!-- Converting Files --> ファイルの変換 <p> <!-- If you need to exchange text files between DOS/Win and Linux, be aware of the ``end of line'' problem. Under DOS, each line of text ends with CR/LF (that is, ASCII 13 + ASCII 10), with LF under Linux. If you edit a DOS text file under Linux, each line will likely end with a strange looking `M' character; a Linux text file under DOS will appear as a kilometric single line with no paragraphs. There are a couple of tools, <tt/dos2unix/ and <tt/unix2dos/, to convert the files. --> もし DOS/Win と Linux 間でテキストファイルを交換したいのなら、 「end of line」の問題に気を付けてください。DOS 上ではテキストの行は CR/LF (これは ASCII 13 + ASCII 10) で終了しますが、Linux 上では LF になります。もしあなたが DOS のテキストを Linux 上で編集したら、 それぞれの行がおかしな終わりを持つことが多いです(「M」に見える文字)。 Linux で作成されたファイルは DOS 上では段落のない kilometric single line として表示されます。<tt/dos2unix/ や <tt/unix2dos/ といったファイ ルを変換するツールがあります。 <!-- If your text-only files contain accented characters, make sure they are made under Windows (with Notepad) and not under plain DOS; otherwise, all accented characters will be screwed up. --> もしテキストのみのファイルが強調された文字を含む場合、それが DOS 上で はなく Windows (のメモ帳) で作成されていることを確認しましょう。そうでな いと強調された文字はめちゃくちゃになってしまいます。 <!-- To convert Word or WordPerfect files to plain text, the matter is a bit trickier but possible. You'll need one of the tools that can be found on the CTAN sites; one is <url url="ftp://ftp.tex.ac.uk">. Get the program <tt/word2x/ from the directory <file>/pub/tex/tools/</file>, or try one the programs available in directory <file>/pub/tex/support/</file>. In particular, <tt>word2x</tt> converts Word 6 files, while for Word 97 files you'll need <tt>mswordview</tt> (<url url="http://www.csn.ul.ie/~caolan/docs/MSWordView.html">) that turns them to HTML. --> Word や WordPerfect ファイルを普通のテキストに変換するのはちょっとやっ かいですが、不可能ではありません。必要なファイルは CTAN の各サイトで 見付かります。ひとつは <url url="ftp://ftp.tex.ac.uk"> です。 プログラム <tt/word2x/ をディレクトリ <file>/pub/tex/tools/</file> から入手するか、<file>/pub/tex/support/</file> 内で入手可能なプログラム を試してみましょう。特に、 <tt>word2x</tt> は Word 6 ファイルを変換しますが、Word 97 ファイルに は HTML に変換してくれる <tt>mswordview</tt> (<url url="http://www.csn.ul.ie/~caolan/docs/MSWordView.html">) を使用する必要があります。 <sect1> <!-- Free Office Suites --> フリーのオフィス製品 <p> <!-- If converting files is not enough, you have the choice of sinking your teeth into a (free!) Microsoft Office like package. --> もしファイルの変換で満足できないなら、Microsoft Office に似た パッケージ (フリー!) を試してみることができます。 <!-- The StarOffice suite is free for private use. It's big, somewhat slow, but very good anyway: it offers a lot of functionality not found in Microsoft Office. It can also read and write Word and Excel files, although the conversion isn't always perfect. Home page: <url url="http://www.stardivision.com">. --> StarOffice は個人使用なら無料です。これは大きいし、ちょっと遅いですが それをふまえても素晴らしいソフトで、Microsoft Office にないようなたくさんの機能を提供しま す。さらに、いつも完璧に変換できるわけではありませんが Word や Excel のファイルを読み書きでき ます。ホームページ: <url url="http://www.stardivision.com"> <!-- Another good package is Corel WordPerfect, a free edition of which is available for download. Should I say more? Go fetch it: <url url="http://www.corel.com">. --> そのほかのとてもよいパッケージとしては Corel WordPerfect があります。 無料版をダウンロード可能です。これ以上いう必要はありませんね。 今すぐ入手しましょう <url url="http://www.corel.com"> 。 <sect> <!-- The End, for Now --> 今のところはこれで終わり <label id="The End"> <p> <!-- Congratulations! You have now grasped a little bit of UNIX and are ready to start working. Remember that your knowledge of the system is still limited, and that you are expected to do more practice with Linux to use it comfortably. But if all you had to do was get a bunch of applications and start working with them, what I included here is enough. --> おめでとうございます! これであなたは多少ながらも UNIX を理解し、 UNIX を扱う準備ができました。あなたのシステムについての知識は 限られており、Linux を心地よく使えるようになるにはまだまだ練習が必要 なことを心に止めておいてください。でも、あなたのしたいことがたくさん のアプリケーションを入手して使い始めるだけなら、ここに含まれて いる情報だけで十分です。 <!-- I'm sure you'll enjoy using Linux and will keep learning more about it - everybody does. I bet, too, that you'll never go back to DOSWin! I hope I made myself understood and did a good service to my 3 or 4 readers. --> これからあなたも楽しく Linux を使い、もっとたくさんのことを覚えていく ことでしょう (みんなそうです)。DOSWin に戻ったりしないと思いますよ! 自分のいうことを理解してもらえ、私の 3、4人の読者のお役に立てたことを願います。 <sect1> <!-- Copyright --> 著作権 <p> 以下の文は参考のため訳文を挙げますが、原文が優先されます。 Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. 特別に述べられていない限り、Linux HOWTO ドキュメントはそれらの著者に 著作権があります。Linux HOWTO ドキュメントはこのライセンスの記載が あれば、ドキュメントの全体、一部にかかわらず、物理的にも電子的にも 複製や配布が可能です。商用配布は奨励しますが、配布の際には 著者に通知してください。 All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below. 全ての翻訳、改変、そして集合の Linux HOWTO ドキュメントが取り入れられた文章は このコピーライトに保護されていなければなりません。 つまりは改変された文章を作成し、その配布時にさらなる規制を課すことは できないということです。 状況によってはこれらの規則に例外が承諾されることもあります。 下のアドレスの Linux HOWTO コーディネーターにコンタクトしてください。 In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs. 簡単にいうと、私達はこの情報をできるだけ広めたいと思っていますが、 HOWTO ドキュメントの著作権は私達が保持し、さらに HOWTO の再配布時に は事前に通知を頂きたいと思っています。 If you have questions, please contact Tim Bynum, the Linux HOWTO coordinator, at <url url="mailto:linux-howto@sunsite.unc.edu"> via email. 質問がありましたら Tim Bynum ( Linux HOWTO コーディネーター) まで電子メールで コンタクトしてください。<url url="mailto:linux-howto@sunsite.unc.edu"> <sect1> <!-- Disclaimer --> 免責 <p> 以下の文は参考のため訳文を挙げますが、原文が優先されます。 ``From DOS to Linux HOWTO'' was written by Guido Gonzato, <url url="REMOVE_MEguido@ibogeo.df.unibo.it">. (Remove ``REMOVE_ME''.) Many thanks to Matt Welsh, the author of ``Linux Installation and Getting Started'', to Ian Jackson, the author of ``Linux frequently asked questions with answers'', to Giuseppe Zanetti, the author of ``Linux'', to all the folks who emailed me suggestions, and especially to Linus Torvalds and GNU who gave us Linux. This document is provided ``as is''. I put great effort into writing it as accurately as I could, but you use the information contained in it at your own risk. In no event shall I be liable for any damages resulting from the use of this work. 「From DOS to Linux HOWTO」は Guido Gonzato <url url="REMOVE_MEguido@ibogeo.df.unibo.it">(「REMOVE_ME」を取り除い てください) によって書かれました。 「Linux Installtion and Getting Started」の著者 Matt Welsh 、 「Linux frequently asked questions with answers」の著者 Ian Jackson、 「Linux」の著者 Giuseppe Zanetti、メールで提案をくださった皆さん、 そして特に Linux を私達に与えてくれた Linus Torvalds と GNU に多大 に感謝します。 (訳注: 日本語訳をするのにあたって、日下部さん、武井さん、中野さん、 藤原さん、山下さんに大変お世話になりました。どうもありがとうございまし た。) この文章は「無保証」で提供されています。 私はこの文章をできるだけ正確に記述するために多大な努力を注ぎましたが、 文章内に含まれる情報を使用するときは自分の責任で行ってください。 文章内に書かれていることを実行したことによって被るいかなる損害も 著者は責任を持ちません。 <!-- Feedback is welcome. For any requests, suggestions, flames, etc., feel free to contact me. --> フィードバックは歓迎です。要求、提案、お叱り等を気兼ね無く 著者まで送ってください。 Enjoy Linux and life, Guido <tt/=8-)/ </article>