間違いだらけの備忘録

このページの内容は無保証でありこのページの内容によって直接、または間接に損害を受けられたとしても私は責任を取りません。

Linux

git-aware-prompt

rasbianで勉強会のリポジトリをgit-aware-prompt使うと大変に遅かった(プロンプト再表示まで13秒前後)。未マージの"Performance improvement for large repos! (Avoid using "git status")" https://github.com/jimeh/git-aware-prompt/pull/52 https://gith…

HDDシリアルナンバー

http://prognagger.blogspot.jp/2009/01/linux-linuxsata-hdd.html # hdparm -i /dev/sda | grep SerialNo Model=TOSHIBA DT01ACA200, FwRev=MX4OABB0, SerialNo=XXXXXXXXX別方法 # udevadm info -q env -n /dev/[HDDデバイスファイル] | grep ID_SERIAL= TO…

リターンコード-1が255になる

$ cat exitcodetest.c int main() { return -1; } $ gcc exitcodetest.c $ ./a.out $ echo $? 255https://unix.stackexchange.com/questions/37915/why-do-i-get-error-255-when-returning-1 UNIX/POSIX, the exit code of a program is defined to be an un…

dt_to_config

https://togetter.com/li/1000178?page=16 https://twitter.com/mhiramat/status/753488196516798464 dt_to_configはdevicetreeをスキャンして、どのドライバがそれを必要とするか、どのKconfigが関係するかを示してくれる https://elinux.org/Device_Tree_R…

eBPF

https://www.linuxplumbersconf.org/2017/ocw//system/presentations/4786/original/Replacing%20xt_qtaguid%20with%20an%20upstream%20eBPF%20implementation.pdfciliumhttps://github.com/cilium/cilium http://docs.cilium.io/en/latest/bpf/XDP (eXpress…

parted最大容量の指定

全て使用する場合は0 -0を指定。 パフォーマンス優先の際は0% 100%を指定。 (parted) mklabel gpt (parted) mkpart primary ext4 0% 100% (parted) print Model: ATA HGST HDS724040AL (scsi) Disk /dev/sdd: 4001GB Sector size (logical/physical): 512B/4…

Linux GPU drivers in a nutshell.

https://imgur.com/Ql1dsZC 素敵〜 doesn't even have his driver's licence yet and everyone expects him to be the next Dale Earnhardt ?

enscript

diffのカラーhtml,PDF作成 参考 https://qiita.com/him0net/items/1aa93e2f64104deab18f http://news.mynavi.jp/column/osxhack/029/ https://qiita.com/DaisukeMiyamoto/items/0dccc753de9ae1d5cb4a#%E5%AF%BE%E5%BF%9C%E8%A8%80%E8%AA%9E http://qune.csid…

ISOイメージからファイルを抽出してコピーする3つの方法

https://www.tecmint.com/extract-files-from-iso-files-linux/ LinuxでISOファイルをマウント 7zipコマンドを使用 isoinfoコマンドを使用 別解fuse iso https://packages.debian.org/stretch/fuseiso めも、未検証

Stretch gpg (GnuPG) 2.1.18環境でJessie gpg (GnuPG) 2.0.26の情報が表示されない

DBとなる.gnupgはコピーしたのだが表示が異なる Jessie gpg (GnuPG) 2.0.26: $ gpg --fingerprint /home/user/.gnupg/pubring.gpg --------------------------------- pubStretch gpg (GnuPG) 2.1.18: $ gpg --fingerprint $Jessie gpg (GnuPG) 2.0.26:$ md5…

conneting get IP configuration

ブリッジ接続変更時、自動ブリッジにしていて発生。仮想ネットワークエディタで正しい物理IFを選択して解決

nmcliでIPアドレス設定

https://qiita.com/yunano/items/88a6e46b412d3be1d3ec nmcli connection modify enp0s8 ipv4.method manual ipv4.addresses 10.0.2.250/24 ipv4.gateway 10.0.2.1 ipv4.dns 8.8.8.8 めも、未検証 http://www.atmarkit.co.jp/ait/articles/1502/11/news001.h…

LinuxのI/OベンチマークでCrystalDiskMarkと同等の計測をfioで実現

https://www.winkey.jp/article.php/20110310142828679 cd /tmp wget http://www.winkey.jp/downloads/visit.php/fio-crystaldiskmark -O crystaldiskmark.fio fio crystaldiskmark.fioめも

Linux Performance: Why You Should Almost Always Add Swap Space

https://haydenjames.io/linux-performance-almost-always-add-swap-space/ — It’s better to swap out a memory pages that have been inactive for a while and instead keep often-used files in cache and to do this when the server is most idle, whi…

HDD障害のsmartctl

珍しくきちんと表示されているのでめも # smartctl -A /dev/sdc smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-3-amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA S…

Grub1からCDboot

memdisk:/usr/lib/syslinux/memdisk:https://packages.debian.org/stretch/syslinux-common sbootmgr:http://ftp.lanet.lv/ftp/mirror/Slackware/isolinux/sbootmgr/ title Boot "CDDVD" kernel /boot/grub/memdisk initrd /boot/grub/sbootmgr.dskOSインス…

snapdとFlatpak

https://www.hiroom2.com/2016/07/13/snapd%E3%81%A8flatpak%E3%81%AE%E6%AF%94%E8%BC%83/ めも、未検証

machinectl

btrfs+systemd-nspawnのラッパーらしい。 btrfsのスナップショットを活用したコンテナ型仮想化 http://blog.usaturn.net/start_nspawn_on_gentoo/ めも、未検証

Pale Moon for Linux

https://linux.palemoon.org/ Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), http://d.hatena.ne.jp/gunshot/20150131 めも、未検証

tarコマンドでtar.xz圧縮ファイルを作成する

http://linux.just4fun.biz/逆引きUNIXコマンド/tar.xz形式にファイルを圧縮する.html $ tar cJvf 圧縮ファイル名.tar.xz ディレクトリor複数ファイル GNU tar 1.22からxz形式をサポート めも

lessで展開せずに内容確認

.bash_profile export LESS=-M export LESSOPEN="| /usr/bin/lesspipe '%s'" export LESSCLOSE="/usr/bin/lesspipe '%s' '%s'"参考 http://tokyodebian.alioth.debian.org/html/debianmeetingresume200609se4.html https://twitter.com/search?q=LESSOPEN&sr…

バイナリトレーサQira(QEMU Interactive Runtime Analyser)

https://github.com/BinaryAnalysisPlatform/qira/ http://rkx1209.hatenablog.com/entry/2016/09/28/015551 user mode QEMUを使用したバイナリ解析ツールであり、ELFなどの実行形式バイナリを実際に動作させて各命令のレジスタ、メモリへの操作を逐次記録す…

CentOS7世代 hostname変更

http://qiita.com/n-oshiro/items/d18ab37bce2b25b2d5b0 vim /etc/hostnameCentOS 6 とは編集するファイルが違うので要注意 めも

CentOS7世代sysrqデフォルト

/usr/lib/sysctl.d/50-default.conf:kernel.sysrq = 16 https://www.kernel.org/doc/Documentation/sysrq.txt 0 - disable sysrq completely 1 - enable all functions of sysrq >1 - bitmask of allowed sysrq functions (see below for detailed function …

bash ステップ実行

https://blog.sgnet.co.jp/2016/07/bashbash.html #!/bin/bash trap 'read -p "$0($LINENO) $BASH_COMMAND"' DEBUGめも

Building a custom CentOS 7 kickstart disc

http://www.smorgasbork.com/2014/07/16/building-a-custom-centos-7-kickstart-disc-part-1/ http://atosryac.kurinet.org/~one/dokuwiki/doku.php?id=centos:kickstart:note3 めも、未検証

isoイメージへのサイン

https://packages.debian.org/stretch/isomd5sum

CentOS7 世代 UEFI Kickstart

linuxefi /images/pxeboot/vmlinuz inst.ks=hd:sdb1:/ks.cfg quiet initrdefi /images/pxeboot/initrd.imgめも参考 http://nathanpeters.com/2014/05/06/how-to-specify-a-kickstart-file-when-installing-fedora-20-in-uefi-mode/ If you want to specify a…

lsattr chattr

参考 http://it-challe.com/linux-command-permission/ permission deniedの原因の一つ その他、SE Linux。

fuseマウントの停止

.thinclient_drives 削除の準備 mount -l -t fuse.xrdp-chansrv | awk -F " " '{print "fusermount -u " $3}' | bash参考 http://www.joeldare.com/wiki/linux:unmount_all_fuse_mount_points

このページにはhatena以外のサービスからのコンテンツが埋め込まれています。 hatenaによりGoogle AdSense 広告が埋め込まれています。