1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

LPIC102個人的なチートシート

Last updated at Posted at 2021-04-30

#lpic 102 個人的なチートシート

#####自分用に環境変数を設定
~/.bash_profile

#####特殊変数、実行したシェルスクリプト名
$0

#####現在のシェルのプロセス番号
$$

#####許可リストへ追加
xhost +172.16.0.4

#####環境変数によるXサーバの指定
export DISPLAY=172.16.0.1:0

#####X Window Systemのエラー
.xsession-errors

#####MonitorセクションとDeviceセクションの組み合わせ
Screen

#####「XDM」の設定ファイル
/etc/X11/xdm/xdm-config

#####ランレベル3からX Window Systemを起動
startx
xinit
~/.xinitrc
/etc/X11/xinit/xinitrc

#####グラフィカルログイン使用プロトコル
XDMCP

#####useraddデフォルトの値
/etc/default/useradd

#####user1を削除ホームディレクトリも一緒に削除
userdel -r user1

#####グループアカウント「GA」のグループ名を「GB」へ変更
groupmod -n GB GA

一般ユーザのログインを禁止したい場合

/etc/nologin

#####パスワード無効化
!
*

#####グループのパスワードやメンバーを設定
gpasswd

#####一時的なtimerユニット作成
systemd-run

#####ユーザーのcron設定ファイル
/var/spool/cron/

#####systemdにおいてtimerユニットを表示
systemctl list-timers

#####1回限りのジョブを削除
at -d
atrm

#####/etc/crontabスクリプトファイルを置くDir
/etc/cron.d/

#####1回限りのジョブの一覧
atq
at -l

#####ロケール
通貨:LC_MONETARY
数値書式:LC_NUMERIC
文字分類:LC_CTYPE
日付時刻:LC_TIME
言語:LC_MESSAGES
アドレス:LC_ADDRESS
名前:LC_NAME

#####環境変数を設定してAsia/Tokyoを使用
export TZ=Asia/Tokyo

#####/etc/timezoneで使用できるタイムゾーンの値を表示
tzselect

#####ロケール設定ファイル
/etc/locale.conf

#####タイムゾーンの情報ががあるDir
/usr/share/zoneinfo/

#####システム時刻や時刻同期の状態を表示
timedatectl
TZ設定:set-timezone
TZ表示:list-timezones
ntp同期:set-ntp
時刻設定(HWとSY):set-time

#####HW→SYS反映
hwclock --hctosys

#####SYS→HW反映
hwclock --systohc

#####HWkクロック時刻を表示
hwclock -r

#####chronyc
ズレ具合:difile
時刻ソース:sources

#####ログローテーションの設定
/etc/logrotate.conf

#####ジャーナルファイルに書き込む
systemd-cat

#####journalctl
最新:-r、--reverse
Dir:-D、--directory
古い削除:--vacuum-time
表示可能:-l、--full
サイズ削除:--vacuum-size
行表示:-n、--lines

#####ローテーション機能
logrotate

#####ホスト名やネットワークを設定
/etc/sysconfig/network

#####レガシーで印刷ジョブを削除
lprm

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?