Wednesday, July 30, 2014

Find file containing a text recursively in linux

grep -rl "string" /path

Tuesday, July 29, 2014

Fix vagrant error "sudo: sorry, you must have a tty to run sudo"

if you try to spin off a CentOs or Oracle Linux using Vagrant in AWS you will get the following error :

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mkdir -p '/vagrant'
Stderr from the command:
sudo: sorry, you must have a tty to run sudo
The fix is adding the "config.ssh.pty= true" to your Vagrantfile so it will look like something like this :

        config.vm.provider :aws do |aws,override|
                  # blah blah
                  config.ssh.pty= true
        end

Installing Java JDK 7 on Oracle Linux 5.5

Download the rpm

wget https://PATH TO THE RPM

rpm -ivh jdk-7u65-linux-x64.rpm

java -version

 /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_65/bin/java 17065

java -version


Changing the active jdk version

/usr/sbin/alternatives --config java

Monday, July 21, 2014

Change Linux machine name in Ubuntu

sudo hostname chef-worksation

Wednesday, July 9, 2014

See numeric permission in terminal

Ever wanted to see the Linux file permissions to number? (for example convert drwxr-xr-x to 755 ) ?
stat -c "%a %n" *

Related

Labels

computer (45) ubuntu (45) tutorial (20) linux (18) software overview (13) programming (11) terminal (11) troubleshooting (8) life (7) opinion (6) phpBB (4) suggestion (4) tips (4) 12.04 (3) bash (3) extension and addons (3) firefox (3) java (3) personal (3) python (3) vim (3) windows (3) 64bit (2) bug (2) code (2) google (2) google chrome (2) monitor (2) php (2) phpBB3 (2) shell (2) shorter prompt (2) virtualbox (2) $_SERVER['REQUEST_URI'] (1) 2.7 (1) ALT+Backspace (1) AVR (1) Alt-Printscreen-K (1) CTRL+ALT+DELETE (1) Chef (1) Chicago (1) DRM (1) Debugging (1) Gimp (1) Gimp 2.8 (1) Microcontroler (1) Restart X (1) UML (1) Vagrant (1) Ventra (1) adsense (1) apple (1) audio (1) aws (1) backup (1) bing (1) blank (1) boot (1) cd (1) chrome (1) computer kubuntu (1) cookie (1) date (1) display (1) domain name (1) download manager (1) dual boot (1) dual monitor (1) eclipse (1) extensions (1) feature request (1) file (1) folder (1) freeze (1) funny (1) gimp single window (1) gnome 3.10 (1) google docs (1) google plust (1) google+ (1) grep (1) icon (1) idea (1) install (1) iterator (1) linux links (1) list (1) literature (1) microsoft (1) moonlight (1) mysql (1) name (1) nautilus (1) netflix (1) notepad++ (1) permission (1) photo (1) prompt (1) protest (1) read from file (1) realtek (1) resolution (1) roku (1) samsung (1) screenshot (1) server (1) skype (1) space (1) spam (1) spambot (1) system monitor (1) tar (1) task manager (1) template design (1) th23 domain (1) thinking (1) ubuntu 13.10 (1) unity (1) vimrc (1) virtual machine (1) wget (1) with space (1) xorg (1) xrand (1)