Category: OS
-
Ubuntu – Postgres 9.4 Installation in Ubuntu 14.04
# remove the old postgres version (not data) sudo apt-get remove -y postgresql postgresql-9.3 # add package sources list, key and update sudo sh -c “echo ‘deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main’ > /etc/apt/sources.list.d/pgdg.list” wget –quiet -O – http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add – sudo apt-get update -y –fix-missing sudo apt-get install -y libpq-dev postgresql-9.4 References 1.…
-
Ubuntu – insserv – Error Fix – Can’t exec “insserv”: No such file or directory
Setting up postgresql-common (165) … Can’t exec “insserv”: No such file or directory at /usr/sbin/update-rc.d line 203. update-rc.d: error: insserv rejected the script header dpkg: error processing package postgresql-common (–configure): ln -s /usr/lib/insserv/insserv /sbin/insserv References 1. http://askubuntu.com/questions/218511/apt-get-giving-an-error
-
Virtualbox – Share Ubuntu and Mac OS Folders to a Ubuntu Guest Server
Virtualbox – Sharing Folders with the correct permissions # Add current user to vboxsf group in Ubuntu guest OS sudo usermod -aG vboxsf $USER #You can access the share by making the user, or group id of 1000, a member of group vboxsf. #This is done by changing the vboxsf line in the /etc/group file.…
-
Ubuntu – Sudo commands without password in Linux sudoers
Automatically add current user to the sudoers file if sudo grep -q “$USER ALL=NOPASSWD: ALL” /etc/sudoers; then echo “passwordless sudo already active” else echo “setting sudo without password for $USER”; sudo sh -c ‘echo “‘$USER’ ALL=NOPASSWD: ALL” >> /etc/sudoers’ fi Logout or Reboot sudo logout sudo reboot Doing the above Steps Manually sudo visudo [sudo]…
-
Ubuntu – Installation of Firefox, Chrome, Opera Internet Browsers in Ubuntu 12.04, 12.10, 13.10, 14.04, 14.10
1. Mozilla Firefox Firefox in often pre-installed in most Ubuntu derivatives. If not, it can be easily installed from the standard repository. sudo apt-get install -y firefox 2. Google Chrome wget -q -O- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add – sudo sh -c ‘echo “deb http://dl.google.com/linux/chrome/deb/ stable main” > /etc/apt/sources.list.d/google.list’ sudo apt-get update sudo apt-get install…
-
Ubuntu – Dia – Open Source diagramming Software
sudo apt-get install -y dia References Home: https://live.gnome.org/Dia Related Links: http://en.wikipedia.org/wiki/Dia_(software) Manual Installer: http://sourceforge.net/projects/dia-installer/ Linux Installation: http://dia-installer.de/download/linux.html 1. Samples and Examples: https://live.gnome.org/Dia/Examples 2. Additional Stensils Repository: http://dia-installer.de/shapes/index.html.en 3. Gnome Icons: http://gnomediaicons.sourceforge.net/screenshots.html 4. Dia Installation under Windows http://dia-installer.de/download/index.html.en http://download.cnet.com/Dia/3000-2075_4-10833704.html 5. Alternatives: http://www.yworks.com/en/products_yed_about.html
-
Linux – recursively find the newest files in a subdirectory
find . -type f -printf “%C@ %p\n” | sort -rn | head -n 10 References 1. http://stackoverflow.com/questions/10575665/linux-find-command-find-10-latest-files-recursively-regardless-of-time-span
-
Apple iTunes – Add Folder to Library instead of File by File
1. Open iTunes 2. Press Ctrl + B 3. Select “File” for the Menu bar (top left) 4. Select “Add Folder ” 5. Select Folder 6. Go 🙂 References tdb.
-
Linux – multi-hop ssh via jump server
this is how to multi-hop servers in one command ssh -A -t @ ssh -A -X # example to go directly to far-away-server via jump.server: ssh -A -t jump-user@jump.server.net ssh -A -X far-user@far-away-server.net Using a bash alias a@a:~$ head -1 ~/.bash_aliases alias go=’ssh -A -t base@main.app.farm.net ssh -A -X’ a@a:~$ go farm3 Last login: Thu…
-
ncdu – analysing disk usage in linux
# installation sudo apt-get install -y ncdu Usage ncdu -x / #Since scanning a large directory may take a while, you can scan a directory and export the results for later viewing: ncdu -1xo- / | gzip > /tmp/export.gz # …some time later: zcat /tmp/export.gz | ncdu -f- # To export from a cron job,…