blog - re construct the blog files
[blog.git] / posts / linux-note.org
1 #+TITLE: Note of Linux (Debian)
2 #+AUTHOR: Peng Li
3 #+EMAIL: seudut@gmail.com
4 #+DATE: 2016-12-23
5
6 * Install and Environment
7 ** Install ios in virtual box
8 ** install essential softwares
9 *** Change the sourece.list
10 163 mirrors
11 #+BEGIN_EXAMPLE
12   deb http://mirrors.163.com/debian stable main non-free contrib
13   deb-src http://mirrors.163.com/debian stable main non-free contrib
14 #+END_EXAMPLE
15 *** Install essential packages
16 - ~netselect-apt~
17   Find the fastest apt mirror server
18 - vim
19 - sudo
20   Add user to sudo group or change the =/etc/sudoers= to use =sudo= command
21   #+BEGIN_SRC sh :results output replace
22       sudo adduser <username> sudo
23   #+END_SRC
24 - git, openssh-server, emacs, build-essential, tmux, zsh, silversearcher-ag
25
26 *** Build Emacs from source
27 1. gnutls error, to fix, install =gnutls-dev= and =pkg-config=
28 ** others package
29 htop, lftp, apache2, vsftpd, silversearcher-ag,
30 * Issue
31 1. See the router table on mac 
32 #+BEGIN_SRC sh :results output replace
33   netstat -nr
34 #+END_SRC
35
36 2. wget download https
37 https://www.cyberciti.biz/faq/wget-example-download-from-https-web-sites/
38 wget --no-check-certificate https://cyberciti.biz/foo/bar.tar.gz
39
40 3. =ls= in =zsh= has no color
41
42 * VirtualBox
43 Install virtualbox guest addition
44 https://blog.paranoidpenguin.net/2016/12/installing-the-virtualbox-guest-additions-on-debian-8-jessie/
45 ** HostOnly and NAT
46 ** Port forward, web server
47
48 * Raspberry raspbian
49 ** start sshd on boot and vnc server
50 http://www.raspberrypi-spy.co.uk/2012/05/enable-secure-shell-ssh-on-your-raspberry-pi/
51
52 ** Auto mount usb / external disk
53 change fstab file, add one entry with the uuid of the disk
54
55 ** Auto mount smb folder
56 1. manuall mount 
57 #+BEGIN_EXAMPLE
58 sudo mount -t cifs -o username=pi,password=xxx //192.168.31.1/Folder /mnt/folder
59 #+END_EXAMPLE
60
61 http://askubuntu.com/questions/157128/proper-fstab-entry-to-mount-a-samba-share-on-boot
62
63 ** apache2
64 aptitude install =apache2=, start it by runing 
65
66 ** vsftpd
67
68 ** smbclient