Category: unix
-
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
-
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,…
-
wget – Recursive GET – download and crawl websites
recursively download and crawl web pages using wget wget -erobots=off -r http://www.guguncube.com in case downloading hangs due to missing/incorrect robots.txt, just use “-erobots=off”. This skips downloading robots.txt altogether. Multiple URLs wget -erobots=off -i url-list.txt References 1. http://skeena.net/kb/wget%20ignore%20robots.txt
-
Ubuntu – set default text editor
sudo update-alternatives –config editor #There are 5 choices for the alternative editor (providing /usr/bin/editor). # # Selection Path Priority Status #———————————————————— #* 0 /bin/nano 40 auto mode # 1 /bin/ed -100 manual mode # 2 /bin/nano 40 manual mode # 3 /usr/bin/mcedit 25 manual mode # 4 /usr/bin/vim.basic 30 manual mode # 5 /usr/bin/vim.tiny 10…
-
VMWare Player Installation in Ubuntu 11.04/12.04/12.10/13.10
Installation 1. Prepare sudo apt-get install build-essential linux-headers-`uname -r` -y sudo apt-get install make -y sudo apt-get install gcc -y 2. Download vmware player a@a:~$ cd Downloads a@a:~/Downloads$ ls VMware-Player-4.0.2-591240.i386.bundle a@a:~/Downloads$ sudo sh VMware-Player-4.0.2-591240.i386.bundle ???? sudo sh vmware-installer -u vmware-player The installed application can be found under: Applications -> System Tools -> VMWare Player Deinstallation…