1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【自分用メモ】Linuxのコンソール操作でよく使うコマンド

Last updated at Posted at 2023-08-21

主に Ubuntu 20.04 上で確認しています。

ディストリビューション、バージョンの確認

lsb_release -a

参考:Ubuntu/lsb_releaseコマンドでバージョン確認・インストール方法・オプション

ディレクトリ削除

rm -rf ディレクトリ名
  • ディレクトリとその中を、すべて削除
  • 削除時の確認メッセージは表示しない。

参考:https://www.itmedia.co.jp/help/tips/linux/l0027.html

パーミッション設定

chmod 777 ディレクトリ名
  • ディレクトリとその配下のパーミッションを、全ユーザーに全権限を付与する

参考:https://qiita.com/shisama/items/5f4c4fa768642aad9e06

ディレクトリのコピー

cp -r コピーしたいディレクトリ名 コピー後のディレクトリ名
  • ディレクトリごとコピーする
  • ディレクトリの中のファイルもコピーの対象となる

参考:https://eng-entrance.com/linux_command_cp#-r

Linuxの時刻を確認したい

date
  • Linux OS 上での日時とタイムゾーンを表示する

参考:【Linux】時刻設定をする方法を解説

1
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?