기본 콘텐츠로 건너뛰기

11월, 2015의 게시물 표시

Start GPIO node.js app at Raspberry pi starting (systemd)

/etc/systemd/system/yourService.service [Unit] Description=yourService [Service] ExecStart=/usr/bin/node yourPrj/bin/www User=pi Restart=always [Install] WantedBy=multi-user.target Start node as service sudo systemctl start /etc/systemd/system/yourService.service Check service status  sudo systemctl status /etc/systemd/system/yourService.service View a log sudo journalctl

Linux Terminal Commands

File Permissions chmod 777 – read, write, execute for all  chmod 755 – rwx for owner, rx for group and world  File Commands  ls -al – Formatted listing with hidden files  mkdir dir – Create a directory dir  rm name – Remove a file or directory called name  rm -rf dir – Force remove an entire directory dir and all it’s included files and subdirectories (use with extreme caution)  cp -r dir1 dir2 – Copy dir1 to dir2; create dir2 if it doesn't exist  cp file /home/dirname – Copy the filename called file to the /home/dirname directory  scp -p 22 file user@host.com:/home/ - Secure Copy file to host.com /home directory as user through port 22  mv file /home/dirname – Move the file called filename to the /home/dirname directory  ln -s file link – Create symbolic link link to file  cat originFile > targetFile – Places standard input into new file (not work on ssh)  cat origin...