dpkg-reconfigure tzdata command, which allows you to choose the timezone to be used in an interactive manner. Its configuration is stored in the /etc/timezone file. Additionally, /etc/localtime becomes a symbolic link to the corresponding file in the /usr/share/zoneinfo; the file that contains the rules governing the dates where daylight saving time (DST) is active, for countries that use it.
TZ 環境変数を使ってください。TZ 環境変数に設定した値はシステムデフォルトで設定された値よりも優先されます。
$dateThu Sep 2 22:29:48 CEST 2021$TZ="Pacific/Honolulu" dateThu 02 Sep 2021 10:31:01 AM HST
/etc/default/ntpdate ファイルを変更して NTP サーバを変更することも可能です。
/etc/ntp.conf ファイルを編集すれば NTP サーバを設定することも可能です。最も重大な影響をおよぼす設定項目は、この NTP サーバがどの NTP サーバを参照するかです。ネットワークに多くのサーバがある場合、公開 NTP サーバと同期するのは 1 台のローカルタイムサーバだけにして、そのローカルタイムサーバを他のサーバに対する時間ソースとして使ってみると良いかもしれません。
logrotate はログファイルの循環を担当しているプログラムであり、/etc/logrotate.conf ファイルと /etc/logrotate.d/ ディレクトリ内に含まれるすべてのファイルに書かれた指示に従います。管理者が Debian の定義するログ循環ポリシーを改変したい場合、これらの設定ファイルを変更するかもしれません。logrotate(1) man ページでは、これらの設定ファイルで利用できるすべてのオプションが説明されています。ログ循環で保存されるファイルの数を増加させたかったり、削除せずにアーカイブ専用の特定のディレクトリにログファイルを移動させたいと思うかもしれません。また、電子メールでログを送信してログを別の場所にアーカイブすることも可能です。
sudo プログラムです。sudo プログラムは特定のユーザに特別な権限で特定のコマンドを実行することを可能にします。sudo の最も一般的な用途として、信頼できるユーザが root 権限でコマンドを実行できるようにするという用途があります。これを行うには、ユーザは単純に sudo command を実行し、自分のパスワードを使って認証するだけです。
sudo Unix group. To delegate other rights, the administrator can use the visudo command, which allows them to modify the /etc/sudoers configuration file (here again, this will invoke the vi editor, or any other editor indicated in the EDITOR environment variable). Alternatively they might put rules in small files in /etc/sudoers.d/ as long as this directory is included by /etc/sudoers via @includedir /etc/sudoers.d, which is the default for Debian. Adding a line with username ALL=(ALL) ALL allows the user in question to execute any command as root.
/etc/fstab file gives a list of all possible mounts that happen either automatically on boot or manually for removable storage devices. Each mount point is described by a line with several space-separated fields:
blkid device) prefixed with UUID=. This guards against a change in the name of the device in the event of addition or removal of disks, or if disks are detected in a different order. 第 8.8.1 節「ディスクの識別」 covers this topic in more detail.
ext4、ext3、vfat、ntfs、btrfs、xfs などがその例です。
swap special value is for swap partitions; the auto special value tells the mount program to automatically detect the filesystem (which is especially useful for disk readers and USB keys, since each one might have a different filesystem);
mount man ページに書かれています。最もよく使われるものを以下に挙げます。
rw または ro。これはデバイスが読み書き可能状態または読み取り専用でマウントされることを意味しています。
noauto。これは起動時の自動マウントを無効化します。
nofail。nofail オプションを使えば、デバイスが見つからなかった場合にも起動処理が中断されなくなります。nofail オプションを使うデバイスは起動中に取り外されている可能性のある外付けドライブ上のデバイスだけにしてください。なぜなら、systemd は起動処理を続行する前に自動的にマウントされなければならないすべてのマウントポイントが実際にマウントされていることを確認するからです。nofail オプションは x-systemd.device-timeout=5s オプションと併用することが可能であるという点に注意してください。両者を併用することで、systemd は 5 秒間だけデバイスを探索し、その後起動処理を続行するようになります (systemd.mount(5) を参照してください)。
user。user オプションを使うことですべてのユーザが対象のファイルシステムをマウント可能になります (user オプションを指定しなければ、マウントおよびアンマウント操作をできるのは root ユーザだけに限られます)。
defaults。defaults オプションを使うとデフォルトオプション群を指定したことになります。デフォルトオプション群とは rw、suid、dev、exec、auto、nouser、async です。defaults の後に nosuid、nodev などを付ければ、suid、dev をブロックし、これらのオプションを無効化することも可能です。user オプションを追加すればこれが再有効化されます。なぜなら defaults は nouser を含むからです。
0 and kind of a relic. When it is greater then zero, it tells the dump tool that the partition contains data that is to be backed up frequently. The tool supports Ext2/3/4 filesystems only and will use the value here when run via dump -W or dump -w to determine which partitions need to be backed up. Consider the examples in /usr/share/doc/dump/examples/ if you want to use this feature. But there are better alternatives to backup a filesystem, like fsarchiver.
0 の場合、完全性はチェックされません。ルートファイルシステムに対しては 1 を設定するべきです。他の恒久的なファイルシステムに対しては 2 を設定するべきです。
例 8.5 /etc/fstab ファイルの例
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # systemd generates mount units based on this file, see systemd.mount(5). # Please run 'systemctl daemon-reload' after making changes here. # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda1 during installation UUID=7a250fb8-c16d-4a4e-9808-ec08ae92b6c6 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda5 during installation UUID=13f367ae-dbaf-40ed-85c0-4072a2ebe426 none swap sw 0 0 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 /dev/fd0 /media/floppy auto rw,user,noauto 0 0 arrakis:/shared /shared nfs defaults 0 0
/shared/ directory on the arrakis server is mounted at /shared/ on the local machine.
/etc/fstab file is documented in the fstab(5) manual page.
locate command can find the location of a file when you only know part of the name. It sends a result almost instantaneously, since it consults a database that stores the location of all the files on the system; this database is updated daily by the updatedb command. There are multiple implementations of the locate command and Debian picked mlocate for its standard system. If you want to consider an alternative, you can try plocate which provides the same command line options and can be considered a drop-in replacement.
locate is smart enough to only return files which are accessible to the user running the command even though it uses a database that knows about all files on the system (since its updatedb implementation runs with root rights). For extra safety, the administrator can use PRUNEDPATHS in /etc/updatedb.conf to exclude some directories from being indexed.