From ElectroDragon
(Redirected from Linux)
Jump to: navigation, search

Auto start

  1. ’‘’init.d‘’‘ directory names within directory put the startup script for each service, such as sshd, httpd etc.
  2. ‘’‘rcX.d’‘’ directory name, followed by the X stands for each run level. Each service within the directory has links to the startup script file in the init.d, according to the file name link to the start-up state. K said they did not start at the beginning of the service, S starts showing links rc.local file to start the service, referring to the /etc/rc.d/
  3. ’‘’rc.local‘’‘ After the system is initialized and services are ready, the final execution of a script, you can put some simple scripts which
  • Methods /etc/rc.d/rc.local or /etc/rc.local
  • Methods update-rc.d: this can run it as service, /etc/init.d/


  • Change hostname permanently, you should change both for debian based system
/etc/hosts for DNS
  • make alias permanently, add the command at the end of the following file
nano ~/.bashrc


Disk Operation

  • fdisk -l check available disk
  • df -h check disk and also mounted on
  • lsblk list the mounted disk, or lsusb to check disk attached but may not mounted
  • mount normal disk: mount -t ntfs /dev/sda1 /mnt/ or mount -t auto /dev/sda1 /media/SSK
  • Install ntfs-3g format: apt-get install ntfs-3g
  • Error cause ((device sda1): load_system_files(): $LogFile is not clean. Mounting read-only. Mount in Windows.)
  • mount on start, first run: sudo blkid

you will see

/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="15CD-3B79" TYPE="vfat"
/dev/mmcblk0p2: UUID="13d368bf-6dbf-4751-8ba1-88bed06bef77" TYPE="ext4"
/dev/sda1: LABEL="SSK" UUID="C494B1E694B1DADE" TYPE="ntfs"

edit fstab: sudo nano /etc/fstab insert the ntfs type: UUID=C494B1E694B1DADE /media/SSK ntfs gid=root,uid=root,dmask=002,fmask=113 0 0

  • umask sets them to both files and directories, while fmask only applies to files and dmask to directories
  • you have to format it to ext3 or ext4 format firstly, use commoand mkfs.ext3
  • change group and write permission that is the same process above
  • operation not permitted

Network File and Media Share (need fast RPI openelec player)

Use SMB (samba)

Use Minidlna

sudo apt-get install minidlna
  • edit connf for minidlna /etc/minidlna.conf

restart it

sudo /etc/init.d/minidlna force-reload



  • Download CD1 and start install, use network install too to install KDE or gnome graphic desktop


SS client

  • apt-get install shadowsocks
  • sslocal -c ss.json

Proxy - ProxyChains

  • proxychains > tsocks

Proxy - Polipo

  • Install polipo: apt-get install polipo
  • config /etc/polipo/config
proxyAddress = ""
socksParentProxy = ""
socksProxyType = socks5
chunkHighMark = 50331648
objectHighMark = 16384
serverMaxSlots = 64
serverSlots = 16
serverSlots1 = 32
  • restart it: /etc/init.d/polipo restart
  • restart and try:
export http_proxy=""
  • proxychains: /etc/proxychains.conf
  • tsocks: sudo nano /etc/tsocks.conf

Find IP in LAN:

  • install nmap: sudo apt-get install nmap
  • nmap -sn

or use netdiscover

  • sudo apt-get install netdiscover
  • sudo netdiscover -r -i wlan0
  • change wlan0 to eth0

Send udp data to a IP

  • sendip -p ipv4 -is -p udp -us 5070 -ud 5060 -d "Hello" -v
  • Refer to ESP Light


  • media play with omxplayer, command: omxplayer example.mp3
  • to force output : omxplayer -o hdmi example.mp3
  • or: omxplayer -o local example.mp3
  • Use lxmuisc or VLC: apt-get install lxmusic
  • Omx GUI player TBOplayer


  • Set path in ~/.bashrc, or ~/.bash_profile
  • Add line for esp: export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
  • Or use alias: alias get_esp32="export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin"
  • echo $PATH: output: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/he/esp/xtensa-esp32-elf/bin
  • verify: xtensa-esp32-elf-gcc -v

Open windows software

  • install app win: apt-get install wine


Pages in category "Linux"

The following 11 pages are in this category, out of 11 total.