LoginSignup
0
1

More than 5 years have passed since last update.

ちょこちょこ使うけど忘れてしまうので追記しながら書いていく。

シェルってなんだ?

UNIXを構成しているカーネル(Kernel)を操作するためのインターフェイス的存在。
1. シェル

FTPソフトに「FFFTP」とか「FileZilla」があるみたいに、
シェルにもいくつか種類があって、そのうちのひとつがbash。

コマンド

雑多に書いていく。

ls

list?
今いるディレクトリのファイルを表示。

cd

Change Directory
ディレクトリの移動。

実行権限を与える

chmod +x (ファイルパス)
実行権限を与える

実行中のプロセスを終了する

1. すべてのプロセスの詳細を表示

$ ps alx

オプション

  • a : 自分以外のユーザーのプロセスも表示する
  • l : 標準のPID,TTY,TIME,CMDに加え,F,S,UID,PPID,C,PRI,NI,ADDR,SZ,VSZ,RSS,WCHAN,STATも表示する
  • x : 制御端末のないプロセスの情報も表示する

2. 特定のプロセスを指定して終了

$ kill (特定プロセスのPID)

psで調べたPID(process ID)を入力。実行権限が無いと言われたら頭にsudoをつける。
果たしてこれでいいのかな?
【 ps 】 実行中のプロセスを表示する

[RasPi]特定のプロセスを自動起動

/etc/rc.local
を実行権限(sudo)で開いて
exit 0
の前に実行プロセスを記入。
e.g.

\#!/bin/sh -e
\#
\# rc.local
\#
\# This script is executed at the end of each multiuser \runlevel.
\# Make sure that the script will "exit 0" on success or any \other
\# value on error.
\#
\# In order to enable or disable this script just change the \execution
\# bits.
\#
\# By default this script does nothing.

\# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

omxplayer --refresh --loop -o both /home/pi/Desktop/TestMovie.mp4

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