LoginSignup
3
6

More than 3 years have passed since last update.

Android端末でLinuxコマンドを使う

Posted at

はじめに

スマホを弄ってて、ふと、スマホでLinuxコマンド使えたらなぁ〜っと思って調べてみたら、
あったんですよ…Linuxコマンドが使える便利なアプリが…
「Termux」というアプリで無料でPlayストアにて配信されてます。

おなじみのaptコマンドでパッケージ管理も出来ます。

使ってみる

今回は試しにapache2を入れてhtmlファイルを作り、ブラウザで「はろーわーるど」を表示してみる。
Screenshot_20200313-212241.jpg

とりあえずいつもの

apt update
apt upgrade

で、apache2を入れる。ついでにvimも

apt install apache2
apt install vim

で、htmlファイルを作るディレクトリは
/data/data/com.termux/files/usr/shere/apache2/default-site/htdocs/
ファイル名はindex.htmlにでもしておいて、こんな感じに書いてみる。

Screenshot_20200313-220505.jpg

そしてブラウザでhttp://localhost:8080/index.htmlと検索してみたら
Screenshot_20200313-221044.jpg

表示出来た。

まとめ

Termuxすごい(小並感)
SSH接続も可能なので割となんでもできちゃう?
Bluetoothのキーボードが欲しくなる…

3
6
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
3
6