Skip to main content

Posts

Showing posts with the label Linux

Cool Linux Tips & Tricks

Linux is an amazing OS because you can do a lot inside it. Here is a bunch of Tips & Tricks I have found. Find the current time in the timezone you want: $ TZ='America/Los_Angeles' date Tue Dec 11 04:07:18 PST 2018 $ TZ='Europe/London' date Tue Dec 11 12:08:49 GMT 2018 Note: All available timezones can be found at /usr/share/zoneinfo. I recommend to view it using timedatectl list-timezones command. $ timedatectl list-timezones | grep Europe Generate random password string using  date and md5sum or sha256sum $ date | sha256sum | base64 | head -c 8 ; echo Y2RhODhh $ date | md5sum | base64 | head -c 8 ; echo YWNjYzU4 Generate pseudo-random string using OpenSSL  $ openssl rand -hex 8 d0388693bd744e0e $ openssl rand -base64 32 | head -c 12  ; echo uvics5KjODkt Generate random password string using gpg utility $ gpg --gen-random --armor 1 12

How to mute/unmute microphone at HP EliteBook 820 G2 under Ubuntu

If you try to install Ubuntu at HP notebook, you will meet with some drawbacks. HP by default support Microsoft OSes only. You will find that some common things are working not as you expected. For example, you will lose your fingerprint or your touch-pad will work with limitation. But I didn't expect that such a common thing like Microphone mute/unmute key not work under Ubuntu. But it is so! To toggle mute of default microphone under Ubuntu at HP EliteBook you need an  pulseaudio and some scripting. Make sure that you have  pacmd  (from  pulseaudio-utils  package) and  notify-send  (from  libnotify-bin ). Use this script: #!/bin/sh pacmd list - sources | awk '\ BEGIN {default_found=0;} /^[\t ]*\*/ {default_found=1;} /^[\t ]*name:/ { if (default_found) { name=$2; gsub("[<>]", "", name); } } /^[\t ]*muted:/ { if (default_found) { if ($2=="yes") { mute=0; icon="mi...

Work with IPv6 on Ubuntu 16.04

IPv6 is enable in Ubuntu by default, but I have found that without experiece you can spend a lot of time to find information for IPv6 network configuration  and operation. How to change IP address permanently Make changes in  file /etc/network/interfaces iface ens4 inet static  address 192.168.0.254  netmask 255.255.255.0  gateway 192.168.0.1 iface ens4 inet6 static   address 2001:db8::254  netmask 64  gateway 2001:db8::1 Temporary IPv6 Address Assignment stack@devstack# ip address add 2001:db8::254/64 dev ens4   Temporary IPv6 Address Deletion stack@devstack#   ip address del 2001:db8::254/64 dev ens4 Verify IPv6 address configuration stack@devstack# ip address dev ens4 3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000     link/ether 00:50:00:00:04:01 brd ff:ff:ff:ff:ff:ff     inet 192.168.0.254/24 brd 192.168.0.255 sco...