ubuntuにconposer入れてみた
ubuntuにconposer入れてみた。
brew install homebrew/php/composer sudo curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer composer ______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.9.0 2019-08-02 20:55:32
apt-get install を誤って途中で中断してしまった時の対処法 E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
aptがほかで使用してしまっていることになっているので
aptを確認してkillしてしまえば終了です
ps aux | grep apt | grep -v 'grep'
sudo kill <pid>
sudo dpkg --configure -a
で、aptが使えるよになるはずです。
ubuntu mp4、動画が再生できない場合
これを実行
sudo apt install ubuntu-restricted-extras
sudo apt install libdvd-pkg
sudo dpkg-reconfigure libdvd-pkg
見れるようになる
Ping 標的の存在を確認する
ping
ネットワーク上に標的がいるかどうかを確認する
sudo apt install inetutils-ping
pingをインストール
主な書式
ping --help
pingにどのような機能があるかを確認する
Usage: ping [OPTION...] HOST ...
Send ICMP ECHO_REQUEST packets to network hosts.
Options controlling ICMP request types:
--address send ICMP_ADDRESS packets (root only)
--echo send ICMP_ECHO packets (default)
--mask same as --address
--timestamp send ICMP_TIMESTAMP packets
-t, --type=TYPE send TYPE packets
Options valid for all request types:
-c, --count=NUMBER stop after sending NUMBER packets パケットを送信後停止する
-d, --debug set the SO_DEBUG option デバッグオプション
-i, --interval=NUMBER wait NUMBER seconds between sending each packet パケットを送る感覚を変更できる
-n, --numeric do not resolve host addresses
-r, --ignore-routing send directly to a host on an attached network 通常の経路を通らずエラーが返ってくる
--ttl=N specify N as time-to-live
-T, --tos=NUM set type of service (TOS) to NUM
-v, --verbose verbose output
-w, --timeout=N stop after N seconds
-W, --linger=N number of seconds to wait for response
Options valid for --echo requests:
-f, --flood flood ping (root only)rootだけ、パケットを多く送る代わりに損失がある。
--ip-timestamp=FLAG IP timestamp of type FLAG, which is one of
"tsonly" and "tsaddr"
-l, --preload=NUMBER send NUMBER packets as fast as possible before
falling into normal mode of behavior (root only)
-p, --pattern=PATTERN fill ICMP packet with given pattern (hex)
-q, --quiet quiet output
-R, --route record route
-s, --size=NUMBER send NUMBER data octets
-?, --help give this help list
--usage give a short usage message
-V, --version print program version
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
Options marked with (root only) are available only to superuser.
Report bugs to <bug-inetutils@gnu.org>.
pingを使い
応答が帰ってきたら完了とする
-C
-c に送る回数をセットし、使用する
ping -c 2 xxx.xxx.xxx.xxx
PING xxx.xxx.xxx.xxx(xxx.xxx.xxx.xxx): 56 data bytes
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=0 ttl=64 time=0.044 ms
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=1 ttl=64 time=0.093 ms
--- xxx.xxx.xxx.xxx ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.044/0.069/0.093/0.025 ms
xxx.xxx.xxx.xxxに標的を入れて使う
-f
-fで沢山送ってみる。「Ctrl+C」で終了
sudo ping -f xxx.xxx.xxx.xxx
PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx): 56 data bytes
.^--- xxx.xxx.xxx.xxx ping statistics ---
24900 packets transmitted, 24900 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.013/0.083/0.566/0.040 ms
損失しなかったがする場合もある。
-s
パケットサイズの変更
デフォルトは56です。
100の場合
sudo ping -s 100 xxx.xxx.xxx.xxx
PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx): 100 data bytes
108 bytes fromxxx.xxx.xxx.xxx: icmp_seq=0 ttl=64 time=0.039 ms
108 bytes fromxxx.xxx.xxx.xxx: icmp_seq=1 ttl=64 time=0.092 ms
108 bytes fromxxx.xxx.xxx.xxx: icmp_seq=2 ttl=64 time=0.110 ms
^C---xxx.xxx.xxx.xxx ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.039/0.080/0.110/0.030 ms
50の場合
sudo ping -s 50 xxx.xxx.xxx.xxx
PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx): 50 data bytes
58 bytes from xxx.xxx.xxx.xxx: icmp_seq=0 ttl=64 time=0.028 ms
58 bytes from xxx.xxx.xxx.xxx: icmp_seq=1 ttl=64 time=0.129 ms
^C--- xxx.xxx.xxx ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.028/0.079/0.129/0.051 ms
このように+8されているのが分かる
このようにしてネットワーク上に存在しているかどうかを確認することが出来ます
ubuntuでテトリスをする
install
sudo apt install vitetris
play game
vitetris
簡単にできる
レベルが自由に設定できる