Category: ubuntu
-
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…
-
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…
-
Fat Ducks – Finding Disk Space Hogs Quickly in Unix
# install numfmt through coreutils sudo apt-get install -y coreutils alias ducks=’sudo du -cbs * | sort -rn| head -11|numfmt –field 1 –to=iec|column -t’ Add to .bash_aliases > cat ~/.bash_aliases alias ducks=’sudo du -cbs * | sort -rn| head -11|numfmt –field 1 –to=iec|column -t’ .. > ducks 10TB this 5GB is 2MB hello 10KB world…
-
Ubuntu – Install Skype 4.3 on Ubuntu 14.04
# remove and purge old skype versions sudo apt-get remove -y skype skype-bin:i386 skype:i386 sudo apt-get purge -y skype skype-bin:i386 skype:i386 # remove and purge old sni-qt versions sudo apt-get remove -y sni-qt:i386 sudo apt-get purge -y sni-qt:i386 # install new sni-qt version sudo apt-get install -y sni-qt:i386 # download and install latest skype version…