Welcome to LinuxScrew

A site for Linux lovers worldwide. For newbies, system engineers, administrators, and everybody in between. We cover all things Linux, plus various programming languages, including Python, Javascript, and PHP.

View our featured tutorials and projects in the slider below or scroll down to see all recent articles.

How to Convert a USB Printer to Wireless with a Raspberry Pi
How to Use a Raspberry Pi for Digital Signage
The Worst Things You’ll Probably Google As a Programmer on Linux
How to Build a Raspberry Pi Internet Kiosk
Browsing the Internet on a 1989 Macintosh II with a Web Rendering Proxy
previous arrow
next arrow
Slider

13 Linux lethal commands

[digg-me]In this post I will collect all commands which SHOULD NEVER be executed in Linux. Any of them will cause data loss or corruption, can freeze or hang up running system. NEVER RUN THESE COMMANDS IN LINUX BOX CLI! Even if somebody advises you in forum/im to do it. 1. Any of these commands will erase everything from your home directory, root or just will clear up whole disk: sudo rm -rf / rm -rf .* dd if=/dev/zero of=/dev/sda mkfs.ext3 /dev/hda whatever > /dev/hda cd … Read more

Faces behind Linux — Part #1

What/who you imagine when you hear the names “Ubuntu”, “Debian”, “Slackware”, etc?  Is this tux, penguin, disribution logo? Have you ever wondered who is behind certain Linux distribution? Ian Murdock (left) founded Debian while a student in 1993. He named Debian after himself and his then-girlfriend Debra, now his ex-wife, thus Deb(ra) and Ian. From Ian’s blog: Debian was one of the first Linux distributions and arguably the first open source project that explicity set out to be developed in a decentralized fashion by a … Read more

Tiny bash scripts: check Internet connection availability

Sometimes it is necessary to check whether server you want to run some big bash script is connected to Internet. Usually it makes sense while running scripts periodically using cron.  Below is the tiny bash script for this purpose: #!/bin/bash WGET=”/usr/bin/wget” $WGET -q –tries=10 –timeout=5 http://www.google.com -O /tmp/index.google &> /dev/null if [ ! -s /tmp/index.google ];then echo “no” else echo “yes” fi As you see it tries to download google’s index page, if it’s not empty script returns “yes”, if there is not Internet connection … Read more

Mount remote filesystem via ssh protocol using sshfs and fuse [Fedora/RedHat/Debian/Ubuntu way]

Imagine the following situation: you have to compile some Linux/Unix application or kernel module that requires kernel source present at your hard drive, say, in /usr/src/kernels/kernel-2.6.21-i386/ or elsewhere. But there is not enough disk space to copy these sources or install kernel-devel or linux-source packages (in Fedora/RedHat or Ubuntu/Debian distros respectively)… Sounds familiar? Believe me, sometimes it happens 🙂 As a solution you can mount the directory of some remote PC that contains needed kernel source. It can be done via several protocols like smb, … Read more

VMware server console keyboard problem in Ubuntu Intrepid Ibex

Ubuntu (featured logo)

Few days ago I have upgraded my Ubuntu to latest 8.10 (Intrepid Ibex) and found that keyboard just doesn’t work in VMware Server Console. The problem was that I couldn’t use keyboard under guest operating system including Windows, Linux etc. After few hours of research I found simple solution which works for me:

$ setxkbmap
$ echo "xkeymap.nokeycodeMap = true" >> ~/.vmware/config

After this restart vmware-server-console and see if it helps. If not you can see other solutions of the same problem at this site:
http://nthrbldyblg.blogspot.com/2008/06/vmware-and-fubar-keyboard-effect.html

I hope it helps!

Read more

Use iTunes in Linux including Apple Music Store

Quick Introduction to iTunes Apple iTunes is one of the most popular proprietary digital media players in the whole world. Using this no doubts outstanding application you can organize, play music/video files in very comfortable and user friendly way (it’s not an advertisement but real truth). Moreover iTunes is the only way to access Apple’s onilne music store and thus people often seeks the possibility to seamlessly access it after moving to Linux from Mac or Windows. Well, unfortunately Apple doesn’t believe in magic so … Read more

Convert WMA to MP3 in Ubuntu

Ubuntu (featured logo)

In order to convert WMA file into MP3 format in Ubuntu (or Debian) you should install the following requirements first: 1. mplayer (sudo aptitude install mplayer) 2. lame (sudo aptitude install lame) 3. win32 codecs (sudo aptitude install ubuntu-restricted-extras) and then convert file.wma into file.mp3 using the following console command: mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader file.wma;lame -m s -V 3 audiodump.wav;mv audiodump.wav.mp3 file.mp3;rm audiodump.wav This also works for Fedora / Centos / Redhat family Linux distributions (requirements should be installed by … Read more

FAQ: How to change Duplex and/or Auto-Negotiation NIC settings in Linux?

Q: How to disable auto-negotiation option of my network interface card and set up half/full duplex mode manually from Linux command line (CLI)? By the way, how to see current settings? A: There are several Linux utilities coming with almost any distribution including Debian, Ubuntu, Fedora, RedHat, Mandriva, Centos whatever. See details below. ethtool This is rather powerful utility can display and change settings of ethernet network interface card. You can easily disable/enable autonegotiation option for your NIC, also it’s possible to manually set up … Read more

FAQ: How to scrollback in GNU SCREEN?

Q: I was compiling kernel using GNU Screen utility but something happened during the compilation and I want to see full error’s output but I can’t just scrollback using Ctrl+PageUp. How to scrollback in GNU Screen? A: In GNU Screen press Ctrl + a + [ to enter Copy Mode, then scroll up/down using keys j or k. Below are some other navigation keys: h – Move the cursor left by one character j – Move the cursor down by one line k – Move … Read more

Create .deb or .rpm from .tar.gz with checkinstall

Checkinstall is extremely useful utility to create .deb packages for Debian, Ubuntu (or .rpm packages for Fedora, RedHat, CentOs) from .tar.gz (or .tgz) source tarball after it’s compiled at your Linux box. In other words you can prepare binary package for later usage without need to compile software from sources every time you need to get it installed on certain Linux box. Another application of checkinstall is software deinstallation that was compiled and installed from sources. As you might already noticed, not every programmer adds … Read more