総数:28 今日:1 昨日:0
~$ sudo apt update ~$ sudo apt install net-tools ~$ sudo apt install cifs-utils
~$ ifconfig
enp0s3 Link encap:イーサネット ハードウェアアドレス 01:23:45:67:89:01
inetアドレス:192.168.3.25 ブロードキャスト:192.168.3.255 マスク:255.255.255.0
inet6アドレス: aaaa::0000:1111:22:3333/64 範囲:リンク
inet6アドレス: aaaa:0000:111:2222:3333:4444:5555:6666/64 範囲:グローバル
inet6アドレス: aaaa:0000:111:2222:3333:4444:5555:6666/64 範囲:グローバル
UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1
RXパケット:2059 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:229 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:1000
RXバイト:129163 (129.1 KB) TXバイト:23150 (23.1 KB)
lo Link encap:ローカルループバック
inetアドレス:127.0.0.1 マスク:255.0.0.0
inet6アドレス: ::1/128 範囲:ホスト
UP LOOPBACK RUNNING MTU:65536 メトリック:1
RXパケット:48 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:48 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:1000
RXバイト:4180 (4.1 KB) TXバイト:4180 (4.1 KB)
~$ LANG=C xdg-user-dirs-gtk-update
~$ sudo gedit /etc/sudoers.d/<username>
<username> ALL=NOPASSWD: ALL
~$ sudo chmod 440 /etc/sudoers.d/<username>
~$ sudo apt-get -y update
~$ sudo apt-get install vim ~$ sudo apt-get install vim-gnome
~$ cat <<EOF > .vimrc set guifont=Courier\ 10\ Pitch\ 11 set number set cursorline command! -nargs=1 Grep call s:Grep(<f-args>) function! s:Grep(command) let orig_grepprg = &l:grepprg let &l:grepprg = substitute(a:command, '|', '\\|', 'g') grep let &l:grepprg = orig_grepprg endfunction set encoding=utf-8 EOF
~$ sudo apt-get install git-core
~$ cat <<EOF > create_gitconfig.sh
#!/bin/bash
how_many_params=\$#
echo "how_many_params: \${how_many_params}"
if [ \${how_many_params} -ne 2 ] ; then
echo "error: illegal parameters."
exit 1
fi
git config --global user.name "\$1"
git config --global user.email "\$2"
git config --global color.ui auto
git config --global core.editor vim
echo "---- .gitconfig ----"
cat .gitconfig
echo "---- .gitconfig end----"
exit 0
EOF~$ chmod a+x create_gitconfig.sh
~$ ./create_gitconfig.sh "user_full_name" "mailaddress"例
~$ ./create_gitconfig.sh "John Smith" "john.smith@domain"
~$ cat .gitconfig