Using Linux: Understanding CUI, Directory Structure, and Paths (400 words)
Linux is a popular operating system used in many servers and computers around the world. Unlike Windows or macOS, Linux often uses a CUI (Character User Interface) instead of a GUI (Graphical User Interface). This means that users type commands into a terminal window, instead of clicking icons or buttons. Since Linux is an operating system used to provide all kinds of services, you will have many opportunities to operate it, so it is important to know how to operate Linux.
Linuxは、世界中の多くのサーバーやコンピューターで使用されている広く普及しているオペレーティングシステムです。WindowsやmacOSとは異なり、LinuxはGUI(グラフィカルユーザーインターフェース)ではなく、多くの場合CUI(キャラクターユーザーインターフェース)を使用します。つまり、ユーザーはアイコンやボタンをクリックするのではなく、ターミナルウィンドウにコマンドを入力します。Linuxはあらゆるサービスを提供するために使われるオペレーティングシステムであるため、操作する機会は多く、Linuxの操作方法を知っておくことが重要です。
When using the terminal in Linux, you work with files and folders (directories) through commands. To do this, you must understand the directory tree structure. In Linux, all files and directories start from a single root directory, written as “/” (a forward slash). This is like the base of a tree. From this root, many branches (folders) grow, such as /home, /etc, /bin, and more.
Linuxでターミナルを使用する場合、コマンドを使ってファイルやフォルダ(ディレクトリ)を操作します。そのためには、ディレクトリツリー構造を理解する必要があります。Linuxでは、すべてのファイルとディレクトリは「/」(スラッシュ)で表記される単一のルートディレクトリから始まります。これは木の根元のようなものです。このルートから、/home、/etc、/binなど、多くの枝(フォルダ)が伸びていきます。
Each user usually has a personal folder inside /home. For example, if your username is “taro,” your home directory will be /home/taro. This is where your personal files and settings are saved. When you log into Linux, the first place you end up is often the home directory of the logged in user.
通常、各ユーザーは/home内に個人用フォルダを持っています。例えば、ユーザー名が「taro」の場合、ホームディレクトリは /home/taro になります。ここに個人ファイルや設定が保存されます。Linux にログインすると、多くの場合、最初に表示されるのはログインユーザーのホームディレクトリです。
Linux also uses something called a path to show the location of a file or directory. There are two kinds of paths: absolute paths and relative paths.
Linux では、ファイルやディレクトリの場所を示すためにパスと呼ばれるものも使用します。パスには、絶対パスと相対パスの2種類があります。
An absolute path shows the full location from the root. For example, /home/taro/Documents/report.txt is an absolute path to a file named “report.txt.” It starts from the root and goes down each folder step by step.
絶対パスは、ルートからの完全な場所を示します。例えば、/home/taro/Documents/report.txt は、「report.txt」というファイルへの絶対パスです。ルートから始まり、各フォルダを段階的に下っていきます。
A relative path shows the location based on your current directory. If you are in /home/taro, and you want to open “report.txt” in the Documents folder, the relative path is Documents/report.txt.
相対パスは、現在のディレクトリを基準とした場所を示します。現在 /home/taro にいて、Documents フォルダ内の「report.txt」を開きたい場合、相対パスは Documents/report.txt です。
To move around in the terminal, you can use the “cd” command, which means “change directory”. For example, “cd /home/taro/Documents” moves you to the Documents folder. You can also use “ls” to list files and “pwd” to show your current location.
ターミナル内で移動するには、「ディレクトリの変更」を意味する「cd」コマンドを使用します。例えば、「cd /home/taro/Documents」と入力すると、Documents フォルダに移動します。また、「ls」でファイル一覧を表示したり、「pwd」で現在位置を表示したりすることもできます。
When using the CUI, it is important to check the current directory and the location (path) of the file you want to manipulate, and to know the command that corresponds to the operation you want to perform.
CUIを使用する場合は、現在のディレクトリと操作したいファイルの場所(パス)を確認し、実行したい操作に対応するコマンドを把握しておくことが重要です。