OS

ノートPCを閉じてもサスペンドさせない

OS

Ubuntu (20) https://qiita.com/FSMS/items/0a562a330ba7914e98cf vim /etc/systemd/logind.conf HandleSuspendKey=ignoreHandleHibernateKey=ignoreHandleLidSwitch=ignore systemctl restart systemd-logind.service Debian (10) https://qiita.com/FSMS/i…

DHCPサーバ

OS

Ubuntu (20)https://techexpert.tips/ja/ubuntu-ja/ubuntu-linux%E3%81%AEdhcp%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC/ apt updateapt -y install isc-dhcp-server cp -p /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.origvim /etc/dhcp/dhcpd.conf ddns-updat…

ファイル分割

OS

Ubuntu (20) -- テストファイル作成head -c 1GB /dev/urandom > dummy.dmp -- ファイル分割split -d -a 4 --additional-suffix=.dmp -b 100000000 dummy.dmp dummy- -d -> 接尾辞を英字ではなく数字にする-a 4 -> 接尾辞の長さを 4 にする--additional-suffi…

動画配信サーバ

OS

Ubuntu (16) https://ticktakclock.hatenablog.com/entry/2018/09/12/203900 -- 1. nginxのコンパイル apt updateapt upgradeapt install wget gcc openssl libssl-dev gitapt install build-essential libpcre3 libpcre3-dev unzip zlib1g-dev mkdir /store…

SSHアカウントロック

OS

Ubuntu (20)https://www.server-world.info/query?os=Ubuntu_18.04&p=pam_tally -- 1.設定vim /etc/ssh/sshd_configUsePAM yes systemctl restart sshdsystemctl status sshd vim /etc/pam.d/common-auth 下記を追加(3回失敗で無期限ロック) auth required p…

VNC

OS

Ubuntu (20)https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-20-04-ja apt updateapt install xfce4 xfce4-goodiesapt install tightvncserver vncpasswdvncserver :1ps -ef | grep vncvncserver -kill :1 mv…

Jenkins

OS

Ubuntu (20)https://tutorialcrawler.com/ubuntu-debian/ubuntu-20-04%E3%81%ABjenkins%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/ apt update apt install default-jdk wget -q -O - https://p…

PowerShellでHello World

OS

Ubuntu (20)https://docs.microsoft.com/ja-jp/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1https://qiita.com/koyoru1214/items/721e528c86ee2baff871http://nyoro2.net/wp/?p=269 apt updateapt install -y wge…

Redmine

OS

Ubuntu (18) http://blog.redmine.jp/articles/4_1/install/ubuntu/ OS: Ubuntu18.04Redmine: 4.1PostgreSQL: 10Apache: 2.4Ruby: 2.6 --1. ロケールの設定locale-gen ja_JP.UTF-8locale -a --2. 必要なパッケージのインストールapt updateapt install -y bu…

インタフェースメトリックの変更

OS

Ubuntu (20) https://matsumana.wordpress.com/2011/04/25/ubuntu%E3%81%A7lua3-u2-agt%E3%82%92%E4%BD%BF%E3%81%86/https://qastack.jp/superuser/331720/how-do-i-set-the-priority-of-network-connections-in-ubuntuhttps://askubuntu.com/questions/1008…

サスペンド

OS

Ubuntu (18)https://qiita.com/Hypnam/items/1c8fdf05f5478188d96f ①実機で確認 systemctl suspend →サスペンドとWOL復帰どちらも可能 ②ESXiで確認 systemctl suspend →サスペンドはできるがWOLで復帰しない、コンソールクリックでも復帰できない Debian (9)…

アセンブラでHello World

OS

Ubuntu (20)http://hironemu.hatenablog.com/entry/20090210/1234279094 apt install nasmnasm --version vim hello.asm section .textglobal _start msg db 'Hello world!', 0x0Amsglen equ $ - msg _start: mov ecx, msg mov edx, msglen mov eax, 4 mov e…

CでHello World

OS

Ubuntu (20)http://yamada.daiji.ro/blog/?p=1044 apt install build-essential gcc --version vim hello.c #include <stdio.h> int main(void){ printf("Hello World!\n"); return 0;} gcc -o hello hello.c./hello --vim web.c #include <stdio.h>#include <string.h>#include <sys/types.h>#include <sys/socket.h></sys/socket.h></sys/types.h></string.h></stdio.h></stdio.h>…

PHPでHello World

OS

Ubuntu (20) apt install php7.4-cliphp -v vim hello.php php hello.php --vim web.php php -S 192.168.137.167:8080 web.php Debian (10) apt install php7.3-cliphp -v vim hello.php php hello.php --vim web.php

WordPress

OS

Ubuntu (18)https://qiita.com/cherubim1111/items/265cfbbe91adb44562d5 Apache: 2.4.29PHP: 7.2.24MariaDB: 10.1.44WordPress: 5.1.6 apt -y updateapt -y install apache2 systemctl enable apache2systemctl start apache2 apt -y install php7.2 php7.2…

VSCode

OS

Ubuntu (20)https://qiita.com/yoshiyasu1111/items/e21a77ed68b52cb5f7c8 snap install --classic codesnap list -- 一般ユーザで実行code --versioncode Debian (10)http://nao-yu-ki-pc.blogspot.com/2019/09/debian-visual-studio-code.html apt install…

RubyでHello World

OS

Ubuntu (20)https://techacademy.jp/magazine/19901 apt install ruby-fullruby --version vim hello.rbprint "Hello World!\n" ruby hello.rb --vim web.rb require 'webrick' op = { BindAddress: "192.168.137.167", Port: 8080, DocumentRoot: "." }s = …

PythonでHello World

OS

Ubuntu (20)https://qiita.com/okhrn/items/4d3c74563154f191ba16 apt install python3 python -V vim hello.pyprint("Hello World!") python hello.py -- python -m http.server 8080-- vim web.py #!/usr/bin/env python3import http.serverimport sockets…

JavaでHello World

OS

Ubuntu (20)https://qiita.com/terappy/items/537c069923144a9d9755https://eng-entrance.com/java-hello-worldhttps://www.net.t-labs.tu-berlin.de/teaching/computer_networking/02.08.htm apt install openjdk-8-jdkjava -versionjavac -version vim hel…

PerlでHello World

OS

Ubuntu (20)https://qz.tsugumi.org/Perl_IO_Socket_INET.htmlhttps://www.geekpage.jp/programming/perl-network/simple-http-serv.php perl -v vim hello.pl#! /usr/bin/perlprint "Hello World!\n" perl hello.pl --vim web.pl #!/usr/bin/perl use IO::S…

GoでHello World

OS

Ubuntu (20)https://qiita.com/nsd24/items/7ca62a054ec09c799e1bhttps://qiita.com/notchi/items/5f76b2f77cff39eca4d8http://pineplanter.moo.jp/non-it-salaryman/2017/06/26/webserver-on-golang/ apt install golanggo version mkdir -p /usr/local/gov…

Node.jsでHello World

OS

Ubuntu (20)http://www.tohoho-web.com/ex/nodejs.html apt updateapt install nodejsapt install npmupdate-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 node --version vim hello.js console.log("Hello world!"); node hello.js vim w…

Ansible

OS

Ubuntu (16) apt updateapt install software-properties-commonapt-add-repository --yes --update ppa:ansible/ansibleapt install ansible ansible-playbook --version Debian (9) vim /etc/apt/sources.list deb http://ppa.launchpad.net/ansible/ansib…

パスワード有効期間設定

OS

Ubuntu (16) useradd -d /home/user01 -s /bin/bash user01passwd user01 chage -l user01 chage -M 99999 user01 Debian (9) useradd -d /home/user01 -s /bin/bash user01passwd user01 chage -l user01 chage -M 99999 user01 CentOS (7)useradd user01ec…

シェルの区切り文字

OS

Ubuntu (16)https://ja.stackoverflow.com/questions/17999/ifs%E3%81%AB%E6%94%B9%E8%A1%8C%E3%81%AE%E3%81%BF%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%9F%E3%81%84 echo $SHELL : > a.txtecho "1 2 3" >> a.txtecho "4 5 6" >> a.txtecho "7 8 9" >> a…

ロケール設定

OS

Ubuntu (16)localectllocalectl set-locale "LANG=ja_JP.utf8"localectl (18)localectllocalectl set-locale "LANG=ja_JP.utf8"localectl Debian (9)localectllocalectl set-locale "LANG=ja_JP.utf8"localectl (10)localectllocalectl set-locale "LANG=ja_…

シングルユーザモード

OS

Ubuntu (16)https://hawksnowlog.blogspot.com/2017/01/single-usermode-on-ubuntu1604.html ESCキー押下でGRUB画面に入るUbuntuの行でeを押すlinux の欄の文末に 1 (18) ESCキー押下でGRUB画面に入るUbuntuの行でeを押すlinux の欄の文末に 1 Debian (9)ESC…

タイムゾーン設定

OS

Ubuntu (16)timedatectltimedatectl list-timezonestimedatectl set-timezone Asia/Tokyotimedatectl (18) timedatectltimedatectl list-timezonestimedatectl set-timezone Asia/Tokyotimedatectl Debian (9)timedatectltimedatectl list-timezonestimedate…

キャッシュデータクリア

OS

Ubuntu (16) free -mecho 3 > /proc/sys/vm/drop_cachesfree -m (18) free -mecho 3 > /proc/sys/vm/drop_cachesfree -m Debian (9) free -mecho 3 > /proc/sys/vm/drop_cachesfree -m (10) free -mecho 3 > /proc/sys/vm/drop_cachesfree -m CentOS (7)http…

パーティション暗号化

OS

Ubuntu (16)apt install cryptsetup-bin cryptsetup luksFormat /dev/sdb1 cryptsetup luksOpen /dev/sdb1 secret mkfs -t xfs /dev/mapper/secret mount /dev/mapper/secret /mnt umount /mnt cryptsetup luksClose secret cryptsetup luksDump /dev/sdb1 (…