Search This Blog

22 September, 2016

Increasing the linux terminal console column width and number of rows

very useful tip for embedded Linux engineers and those who work with Linux Console using minicom or teraterm


very useful tip for embedded Linux engineers and those who work with Linux Console using minicom or teraterm

normally if we type ps in serial console, it will show the process , if the length is more than 80 character(which is default) we cannot see the string after 80 characters in the consol,

with the below command you can adjust the width of the terminal with cols argument and number of rows using the  argument rows to the command stty

stty cols 160 rows 40

this can be used separate also
stty cols 160
stty rows 50

Hope this help in ps and htop command when u run and other applications


02 September, 2016

accessing serial port in linux/ubuntu as a normal user

For accessing serial port in linux/ubuntu as a normal user,
we need to add the user to the dialout group
follow the below commands 
 
sudo adduser second_user dialout
or 
sudo adduser `whoami` dialout 


28 August, 2016

Linux File Permission in octal format in terminal or command line

To see the file permission in Linux terminal use the below command

stat -c "%a %n" *

* = will list and show all files , replace with the fie name if you want to know only for one filename

16 August, 2016

virtual machine shared folder permission


When using Ubuntu on Virtual Box, you can share a folder between Windows Hosta and Ubunut Guest, after doing the sharing, you need to set the permission so that it can be accessed using the normal user login



You need to type the followinf command to add the permission for the normal user to access it

sudo usermod -aG vboxsf <youruser_name>

or

sudo usermod -aG vboxsf `whoami`


Wi-Fi command line commands

Wi-Fi(IEEE 802.11) command line useful commands

Wi-Fi AP Mode
1) Scan the network

iw dev wlan0 scan or
iw dev wlan0 scan ap-force


2) Connected Devices to the Wi-Fi Access Point (wifi AP mode)

Using hostapd cli:  hostapd_cli all_sta
using iw: iw dev wlan0 station dump


Wi-Fi Station/Client Mode

1) To Scan network

iw dev wlan0 scan 

to show only the SSID from the ouput
iw dev wlan0 scan | grep SSID






using ctag with PHP


ctags-exuberant -f php.tags --languages=PHP -R



23 July, 2016

ubuntu showing menu always

15.04 and baove has the ability to toggle the global menu as well as the local integrated menus (Via System Settings - Appearance - Behaviour tab) to be permanently on or off.

If you are running a fully up-to-date version of 14.04, this same ability has been backported.

To switch on permanently:

gsettings set com.canonical.Unity always-show-menus true

To switch off i.e. to autohide:

gsettings set com.canonical.Unity always-show-menus false

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...