Posts

Add permanent alias

 Add at the end of file ~/.bashrc alias alias_command 'real command' To load newly created alias immediately: source ~/.bashrc

Move MongDB database

find mongodb config file sudo find / -name mongod.conf -print get dbPath from that file stop mongodb service mongod stop check mongodb is not running sudo systemctl status mongod copy all files from dbPath to new dbPath cp -r old_dbPath new_dbPath chown of new dbPath sudo chown -R mongodb:mongodb new_dbPath change dbPath in mongodb config file to new_dbPath start mongodb sudo systemctl start mongod

Show popup window

 https://wiki.gnome.org/Projects/Zenity

Dropbox not syncing

  sudo chattr -R -i "$HOME/Dropbox" sudo chown -R "$USER" "$HOME/Dropbox" chmod -R u+rw ~/Dropbox dropbox stop; rm -rf ~/Dropbox ~/.dropbox ~/.dropbox-dist; dropbox start -i   Note that Dropbox folder path point to default position. If you have changed this path, make appropriate corrections above

How to become root

sudo su

Mount HDD temporarily on Linux

sudo fdisk -l    mkdir /mnt/mount_name   sudo mount /dev/partition /mnt/mnt_name

Test speaker on Linux

speaker-test -t wav -c 6