Category: linux

Crontab – Linux

Here are some commands to be used to work with crontab in Linux sudo crontab -e Open to edit crontab crontab -l List all your crontab jobs * * * * * command to be executed – – – – – | | | | | | | | | —– Day of week (0 …


Handy commands for working with server using terminal

1- This is to see ports and which application is running on which port sudo netstat -plunt 2- To restart apache server sudo service apache2 restart or /etc/init.d/apache2 restart 3- To check firewall status sudo ufw status verbose 4- To change port listen on Apache server vi /etc/apache2/ports.conf 5- To make new site for Apache …


Why does my gitignore not ignore a file?

When you work with Git, many times, you may see that you have a file but you do not want to track it. You put this file inside your .gitignore but the file still is tracked. Why that problem? This is because your file being held inside git cached. And you will need to remove …


Git – Author’s experience – Part 1

This series of Git handy blogs is continuously updated. During my work, I have learned/collected several git commands and I would like to share them with you. Hope they are useful for your career as well. 1- Common commands git status git log git log –all –decorate –graph : You are able to see, full …


Compress/Extract files with Linux command lines

This blog will be updated frequently to give you as many as possible way to work with compressed files in Linux. A- Compress B- Extract 1 – .7z tientham@tientham:/tmp$ sudo apt-get install p7zip-full tientham@tientham:/tmp$ 7z x /home/tientham/Downloads/tito.7z 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs) Processing archive: /home/tientham/Downloads/tito.7z Enter …


Install Qt for Linux

Qt is a good IDE for C++ development. It also offers you freely many apis for your software development. Following is the way to install qt in Linux Ubuntu: sudo apt-get install build-essential qtcreator qt5-default qt5-doc qt5-doc-html qt5-doc-html qtbase5-examples Some hints: 1- For applying ident: Ctrl + I 2 – To include a folder One …


Fix serial port permission denied errors on Linux

The ancient serial port which is no longer found on the latest motherboards and even the not so latest laptops is still used for connecting to the console of networking devices, headless computers and a lot other applications. On computers which do not have built-in serial ports USB-to-Serial adapters can be used. Linux identifies inbuilt …


GCC and Make Compiling, Linking and Building C/C++ Application

GCC and Make Compiling, Linking and BuildingC/C++ Applications     Very good material!   http://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html     REFERENCES & RESOURCES GCC Manual “Using the GNU Compiler Collection (GCC)” @ http://gcc.gnu.org/onlinedocs. GNU ‘make’ manual @ http://www.gnu.org/software/make/manual/make.html. Robert Mecklenburg, “Managing Projects with GNU Make”, 3rd Edition, 2004.


Install SoftEther Server on Linux Ubuntu 14.04

http://www.softether.org/4-docs/1-manual/7._Installing_SoftEther_VPN_Server/7.3_Install_on_Linux_and_Initial_Configurations   [root@machine root]# tar xzvf vpnserver-5070-rtm-linux-x86.tar.gz [root@machine vpnserver]# make [root@machine vpnserver]# cd .. [root@machine root]# mv vpnserver /usr/local [root@machine root]# ls -l /usr/local/vpnserver/ [root@machine root]# cd /usr/local/vpnserver/ [root@machine vpnserver]# chmod 600 * [root@machine vpnserver]# chmod 700 vpncmd [root@machine vpnserver]# chmod 700 vpnserver [root@machine vpnserver]# ./vpncmd Select 1, 2 or 3: 3 VPN Tools>check VPN Tools>exit /etc/init.d/vpnserver #!/bin/sh # chkconfig: 2345 99 01 # description: SoftEther VPN Server …


Linux Experiences/Hints

1. Before doing anything, it is better to make our linux distribution being up-to-date. $ sudo apt-get update $ sudo apt-get upgrade 2. Find the version of kernel source tree in machine: cd /use/src/<linux-header-version> make kernelversion 3. Find the Linux Version cat /proc/version ——————————————————————————————————————— 4. Update Linux kernel from 3.13. to 3.16. (same for newest …