差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| android:termux [2020/07/06 10:30] – ともやん | android:termux [2022/10/02 02:46] (現在) – [bash の alias 設定] ともやん | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | < | ||
| - | < | ||
| - | #result pre, #mincode pre { | ||
| - | overflow: hidden; | ||
| - | font-size: 10px; | ||
| - | } | ||
| - | # | ||
| - | height: 250px; | ||
| - | overflow: scroll; | ||
| - | overflow-x: hidden; | ||
| - | font-size: 10px; | ||
| - | } | ||
| - | #mintbl table { | ||
| - | font-size: 12px; | ||
| - | } | ||
| - | .dokuwiki .plugin_wrap table { | ||
| - | width: auto; | ||
| - | } | ||
| - | #logo { | ||
| - | background-color: | ||
| - | padding: 10px; | ||
| - | width: fit-content; | ||
| - | } | ||
| - | #logo p { | ||
| - | margin: 0; | ||
| - | } | ||
| - | </ | ||
| - | </ | ||
| ====== Termux - Android用ターミナル & Linux環境 ====== | ====== Termux - Android用ターミナル & Linux環境 ====== | ||
| 本家: [[https:// | 本家: [[https:// | ||
| ソースコード: | ソースコード: | ||
| + | Wiki: [[https:// | ||
| <WRAP prewrap 100% #result> | <WRAP prewrap 100% #result> | ||
| 行 58: | 行 31: | ||
| </ | </ | ||
| + | ===== デバイスストレージのアクセス許可設定 ===== | ||
| + | ホームディレクトリ **~/** は **/ | ||
| <WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
| < | < | ||
| 行 85: | 行 60: | ||
| </ | </ | ||
| + | ===== Vim ===== | ||
| + | |||
| + | ==== インストール ==== | ||
| + | <WRAP prewrap 100%> | ||
| + | < | ||
| + | $ pkg install vim | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% # | ||
| + | < | ||
| + | Reading package lists... Done | ||
| + | Building dependency tree | ||
| + | Reading state information... Done | ||
| + | The following additional packages will be installed: | ||
| + | vim-runtime | ||
| + | The following NEW packages will be installed: | ||
| + | vim vim-runtime | ||
| + | 0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded. | ||
| + | Need to get 5094 kB of archives. | ||
| + | After this operation, 25.8 MB of additional disk space will be used. | ||
| + | Do you want to continue? [Y/n] | ||
| + | Get:1 https:// | ||
| + | Get:2 https:// | ||
| + | Fetched 5094 kB in 8s (622 kB/s) | ||
| + | Selecting previously unselected package vim-runtime. | ||
| + | (Reading database ... 4232 files and directories currently installed.) | ||
| + | Preparing to unpack .../ | ||
| + | Unpacking vim-runtime (8.2.1000) ... | ||
| + | Selecting previously unselected package vim. | ||
| + | Preparing to unpack .../ | ||
| + | Unpacking vim (8.2.1000) ... | ||
| + | Setting up vim-runtime (8.2.1000) ... | ||
| + | Setting up vim (8.2.1000) ... | ||
| + | update-alternatives: | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== OpenSSH ===== | ||
| + | |||
| + | ==== インストール ==== | ||
| <WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
| < | < | ||
| 行 214: | 行 229: | ||
| | oo. | | oo. | ||
| +----[SHA256]-----+ | +----[SHA256]-----+ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== 現在のユーザーを調べる ==== | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ id | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| + | uid=10205(u0_a205) gid=10205(u0_a205) groups=10205(u0_a205), | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== パスワードの変更 ==== | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ passwd | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| + | New password: | ||
| + | Retype new password: | ||
| + | New password was successfully set. | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Android の IP アドレスを調べる ==== | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ ifconfig wlan0 | ||
| + | </ | ||
| + | </ | ||
| + | 以下の例では Android 側の IP アドレスは **192.168.43.235** である。\\ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| + | wlan0: flags=4163< | ||
| + | inet 192.168.43.235 | ||
| + | inet6 fe80:: | ||
| + | unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 | ||
| + | RX packets 2 bytes 248 (248.0 B) | ||
| + | RX errors 0 dropped 0 overruns 0 frame 0 | ||
| + | TX packets 15200979 | ||
| + | TX errors 0 dropped 294 overruns 0 carrier 0 collisions 0 | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== sshd の起動 ==== | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ sshd | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| $ | $ | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== PC 側から接続 ==== | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ ssh u0_a205@192.168.43.235 -p 8022 | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | < | ||
| + | u0_a205@192.168.43.235' | ||
| + | |||
| + | Welcome to Termux! | ||
| + | |||
| + | Wiki: https:// | ||
| + | Community forum: https:// | ||
| + | Gitter chat: | ||
| + | IRC channel: | ||
| + | |||
| + | Working with packages: | ||
| + | |||
| + | * Search packages: | ||
| + | * Install a package: pkg install < | ||
| + | * Upgrade packages: | ||
| + | |||
| + | Subscribing to additional repositories: | ||
| + | |||
| + | * Root: pkg install root-repo | ||
| + | * Unstable: pkg install unstable-repo | ||
| + | * X11: pkg install x11-repo | ||
| + | |||
| + | Report issues at https:// | ||
| + | |||
| + | $ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== bash の alias 設定 ===== | ||
| + | Fedora 風に bash の alias を設定する。 | ||
| + | <WRAP prewrap 100%> | ||
| + | <code bash> | ||
| + | $ vi ~/.bashrc | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% # | ||
| + | <code bash ~/ | ||
| + | alias diff=' | ||
| + | alias egrep=' | ||
| + | alias fgrep=' | ||
| + | alias grep=' | ||
| + | alias l.='ls -d .* --color=auto' | ||
| + | alias ll='ls -l --color=auto' | ||
| + | alias ls='ls --color=auto' | ||
| + | alias xzegrep=' | ||
| + | alias xzfgrep=' | ||
| + | alias xzgrep=' | ||
| + | alias zegrep=' | ||
| + | alias zfgrep=' | ||
| + | alias zgrep=' | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | .bashrc を読み込んで設定を反映する。\\ | ||
| + | <WRAP prewrap 100%> | ||
| + | < | ||
| + | $ . ~/.bashrc | ||
| + | $ alias | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code bash> | ||
| + | alias diff=' | ||
| + | alias egrep=' | ||
| + | alias fgrep=' | ||
| + | alias grep=' | ||
| + | alias l.='ls -d .* --color=auto' | ||
| + | alias ll='ls -l --color=auto' | ||
| + | alias ls='ls --color=auto' | ||
| + | alias xzegrep=' | ||
| + | alias xzfgrep=' | ||
| + | alias xzgrep=' | ||
| + | alias zegrep=' | ||
| + | alias zfgrep=' | ||
| + | alias zgrep=' | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ll を実行する。\\ | ||
| + | <WRAP prewrap 100%> | ||
| + | < | ||
| + | $ ll | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code bash> | ||
| + | total 4 | ||
| + | drwx------ 2 u0_a205 u0_a205 4096 Jul 6 10:06 storage | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== gatling ===== | ||
| + | < | ||
| + | gatling/ | ||
| + | A high performance http, ftp and smb server | ||
| + | |||
| + | $ pkg install gatling | ||
| + | Reading package lists... Done | ||
| + | Building dependency tree | ||
| + | Reading state information... Done | ||
| + | The following NEW packages will be installed: | ||
| + | gatling | ||
| + | 0 upgraded, 1 newly installed, 0 to remove and 51 not upgraded. | ||
| + | Need to get 96.2 kB of archives. | ||
| + | After this operation, 418 kB of additional disk space will be used. | ||
| + | Get:1 https:// | ||
| + | Fetched 96.2 kB in 2s (35.7 kB/s) | ||
| + | Selecting previously unselected package gatling. | ||
| + | (Reading database ... 5637 files and directories currently installed.) | ||
| + | Preparing to unpack .../ | ||
| + | Unpacking gatling (0.15) ... | ||
| + | Setting up gatling (0.15) ... | ||
| + | </ | ||
| + | |||
| + | ===== 参考文献 ===== | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | [[https:// | ||