Linux Tech Hacks

Your Linux tech hacks and Tips

ABC Of Bash Commands


Bash, Unix, Linux, Ubuntu, Debian, Bash shell, Unix shell, Bourne, shell commands, Bash programming, Bash commands, Bash tips, Bash tricks, tech news, news

When it comes to Bash, many could do with some help. So, here it is. 


Thursday, October 31, 2013:  You would all know that Bash replaced the older Unix shell Bourne, which was released in 1989. Since then, it has become the default shell in Linux and Mac OS X. But working on Bash isn’t the easiest thing in the world. That said, it isn’t the toughest either, like any other programming language. Practice definitely makes perfect. So, here we bring you an ABC of Bash commands to help make your life easier.

A
alias: If creating an alias is what you want, then this is it.
apropos: We’re not the only ones providing help. This command you to search through the Help manual pages.
apt-get: This one works on Debian and Ubuntu distros. It is used to install and search for software packages.
aptitude: See the similarity with the above command? This one does the same thing.
aspell: Got bad spellings? Use the spell checker.
awk:No, this command is not for awkward situations. It lets you find text and replace it. Also, you can sort, index and validate things in a database.

B
basename: Sometimes files and directories have suffixes to their names. This one strips them off it.
bash: GNU Bourne-Again Shell
bc: This command is an arbitrary precision calculator language
bg: bg could stand for background couldn’t it? Regardless, that’s what it does, sends to the background
break: Exit from a loop
builtin: Run a shell builtin
bzip2: When there’s ‘zip’ in the name, that’s what it does. It compresses or decompresses files that are named.

C
cal: Need a calendar? This command displays one.
case: In ‘case’ you want to perform a command conditionally. This is how to do it.
cat: In programming, ‘cat’ usually stands for concatenate. Here too, but this command displays the content of the files after concatenation.
cd: Change Directory
cfdisk: In Linux, this command is the partition table manipulator
chgrp: This is how you change the ownership of a group.
chmod:‘Ch’ is for change. This one changes the access permissions.
chown: This one sounds too much like clown! Anyway, it’s not funny though. It changes the owner and group of a file.
chroot: Using this you can run a command, but with a different root directory
chkconfig System services (runlevel)
cksum: It displays the CRC checksum ad byte counts.
clear: If you need to clear the terminal screen, use this command.
cmp: Compare two files
comm: Compare two sorted files line by line
command: Run a command - ignoring shell functions
continue: This is for resuming the next iteration of a particular loop.
cp: Make a copy of files to a different location.
cron: Daemon to execute scheduled commands
crontab: Scheduling is sometimes very important. This command does it, it schedules a command that will run at a specified time.
csplit: Split a file into context-determined pieces
cut: When you need to cut down a file into parts, this is the command to use.

Prasid Banerjee, EFYTIMES News Network 


Fonte: ABC Of Bash Commands

13 Quick Hacks For Linux!

13 Quick Hacks For Linux!


Here we bring to you 13 brilliant quick hacks for Linux users!

If you are a true geek, we are sure you love to do the simplest things in the smartest ways. So, for all the Linux users out there we bring 13 quick hacks to help you to perform some basic to advanced tasks.

1. Ascii Character Lister

To list printable characters and their ascii values, do the following:
perl -e 'foreach $x (32..126){print "_" . chr($x) . "  " . $x . "\n"}'
To find the ascii code for a specific character (other than the space character, use $ in this example), do this:
perl -e 'foreach $x (32..126){print "_" . chr($x) . "  " . $x . "\n"}' | grep '_\$'
Normal characters don't need and can't use the backslash, so to find the asci value of lower case 'd' you'd do this:
perl -e 'foreach $x (32..126){print "_" . chr($x) . "  " . $x . "\n"}' | grep '_d'
To find the character corresponding to an ascii value, do this (example uses 100 as the ascii value):
perl -e 'foreach $x (32..126){print "_" . chr($x) . "  " . $x . "\n"}' | grep ' 100'

2. Directory Size Lister/Sorter

Ever wondered which directories and trees are eating all your diskspace especially during pruning/archiving, backup, and numerous other activities. The following one line script to find out:
du -sm $(find $1 -type d -maxdepth 1 -xdev) | sort -g
The preceding shellscript prints every directory below the one called as an argument, together with its size, sorted with the largest at the bottom. We sort largest at bottom so there's no necessity to pipe it to less. Instead, you can see the largest 24 on the screen after the command.
If you find a large tree, but can't delete the whole thing, you can explore just that tree by using its directory as the argument, and you'll see all its subtrees and how much space they take.
But let's say you want to see ALL directories in the tree, instantly zeroing in on big diskspace directories. Make the following shellscript, which called alldirsizes:
find $1 -type d  | xargs du -sm | sort -g
Both these scripts do more than just add filesizes. They take into account inodes, so they reveal the space that would be recovered if the directories were deleted.
Both of these scripts are most accurate when run as root, but they're pretty informative run as just a normal user.

3. Man pages formatted as text

Man pages look great on console screens, but piped to files or to browsers they quickly degenerate into cluttered conglomerations of reverse linefeeds and backspaces designed to simulate "bold" on your console screen. You get rid of the clutter by piping the output of man through thecol command. With no args, col blows off the reverse linefeeds but leaves the backspaces (^H). The command you want (using the ls man page as an example) is:
man ls | col -bx > myfile.txt
The preceding command writes the man page to myfile.txt, without backspaces (the -b) and with spaces substituted for tabs (-x).

4. Recording, Playing and Converting sounds

Before you start on this, install aumix and use it to do both record and play volumes, and make sure the microphone is the record device and not muted. Don't use a GUI mixer -- they sometimes get it wrong.
To record a song from the microphone, just do this:
$ rec mysong.au
If you want to change the volume, use -v, which is a float where >1.0 amplifies, and <1 .0="" attenuates.="" font="" hearing="" is="" logarithmic.="" note="" our="">
$ rec -v2 mysong.au
To play it back, do this:
$ play mysong.au
To convert it to a .wav, do this:
$ sox mysong.au mysong.wav
Sox can also amplify, flanger, phaser, echo, and various other effects. See man sox.

5. Finding Who Has a File Open

How often do mounts and unmounts fail because you can't determine what is using the device? How many times can you not eject a CD because something's got it open? How many times have you experienced a "file browser" that keeps a directory open even after you've navigated out of that directory and clicked the "refresh" button? Who's got this thing open??? Use the fuser program to find out:
[slitt@mydesk slitt]$ /sbin/fuser -mu /d
/d:                   1693(slitt)  1891c(slitt)  1894  1894c(slitt)
  1907  1907c(slitt)  1908  1908c(slitt)  1909  1909c(slitt)
  1910  1910c(slitt)  1912  1912c(slitt)  1913  1913c(slitt)
[slitt@mydesk slitt]$
You get the owner and the process ID. From there you can research usingps ax.
Be sure to look at the fuser man page for details on other info you can obtain. You can even kill all processes accessing a file, though its is highly recommend against such a heavy handed move.

6. Modem Init Strings

Delay for Voicemail Phones

On some phone systems with voicemail, when there are unheard messages, the dialtone beeps several times. This can prevent the modem from connecting. If you have this problem, you can solve it with a simple modem init string addition.
On a Hayes compatible modem, and the following string onto the end of your modem init string:
S6=4
Register S6 determines the delay before checking for dialtone. By instituting a 4 second delay, by the time you check for a dialtone all the beeps will be gone. If 4 seconds isn't enough, try 10, and then trim it down from there.

7. How to enable X across a network connection

  1. You might need to institute the ssh connection as ssh -x
  2. export DISPLAY=":0"
  3. ;xhost +

8. Enabling Root on Ubuntu

If you're reading this now, you probably got a rude awakening when you tried to log into a Ubuntu box as user root. By default, it can't be done.
The trick is that Ubuntu enables anything, absolutely anything, via the sudo command. As a matter of fact, anyone logged in as any user can get a root shell with the sudo bash command. This in itself is a horrible security problem, because anyone who logs in, locally or remotely, as any user can have the way with the machine. This situation must be rectified immediately.
What you'll want to do, in plain English, is this:
  1. Get into a root shell
  2. Use the passwd command to enable logging into user root
  3. Test that you can log into root
  4. Disable overly permissive sudo capabilities
Here are the specific commands:
  1. sudo bash
  2. passwd root
    • Set a root password
  3. Ctrl+Alt+F3 to access a new CLI terminal
  4. Log in as root
  5. visudo
    • Comment out root=(ALL) ALL to eliminate this dangerous sudo capability
    • Comment out %admin=(ALL) ALL to eliminate this dangerous sudo capability

9. Turning Off OpenOffice Autocompletion

Of all the obnoxious "features" ever created, OpenOffice's "Word Autocompletion" is probably the worst. It makes the old "Microsoft Bob" look positively benign.
OpenOffice's autocompletion looks at your typing, and when a word appears to resemble another word in the document, it "helps" you by highlighting the whole word and adding letters to make it the resembled word. For a fast touch typist, it's distracting as the dickens.
So turn it off. From the OpenOffice menu, Tools->Autocorrect, and then uncheck the "Enable Word Completion" checkbox. That's it -- no more obnoxious word completion.

10. Copying Via SSH

If you want to copy an entire tree from one computer to another, sftp won't do it. Rsync can do it, but in certain cases rsync can consume too much RAM. Assuming you're user slitt on the destination, and the tree belongs to user slitt on the source, here's a very easy to remember way to do it:
ssh slitt@source 'tar -cz /home/slitt/mytree' | tar -xzp
The p on the end of the extraction tar means "preserve permissions". The preceding places the home/slitt/mytree into the current directory, so you'll need to move mytree where you need it and delete the rest of the tree. To avoid that hassle and put mytree right into the current directory, use the -C option:
ssh slitt@source 'tar -C /home/slitt -cz mytree' | tar -xzp
Notice that everything within the singlequotes is performed on the remote computer, and everything after the last quote is performed on the local computer. The ssh program, when running a command, outputs the remote command's stdout on the local computer, so that data can be piped to local processes, which is what we're doing here.
The plot thickens if some files within the tar have different owners. In that case, the best thing to do is log into the local machine as root, go to the destination directory, and run it with the --same-owner argument on the extraction tar:
ssh slitt@source 'tar -C /home/slitt -cz mytree' | tar -xzp --same-owner
Although unless space is too tight to maintain both the .tgz and the extracted tree on the destination computer, this is better done as a three stage process:
ssh slitt@source 'tar -C /home/slitt -cz mytree' > /spare_directory/mytree.tgz
tar -tzp --same-owner -f /spare_directory/mytree.tgz
tar -xzp --same-owner -f /spare_directory/mytree.tgz
The first command creates a tarball, on the local computer, from the tree on the remote computer. The second command checks what's in the tarball, so if there's something wrong you can quit rather than possibly overwriting something valuable. The third command extracts the tarball to the current directory. Once again, the only real disadvantage of this is that you must have room for both the tarball and the extracted tree.

11. Running Terminals With Specific Fonts

This works for xterm and rxvt, and probably works for others. To specify a normal font (as opposed to a font used for bold), you run xterm with the -fn option:
rxvt -fn font_alias
The only trouble is, how do you find the font alias? That's contained in a file called fonts.alias. You find that file with locate command:
locate fonts.alias
When you look inside that file, each line has an alias followed by a space followed by a complete file specification, as shown in the following example:
lucidasanstypewriter-12 -b&h-lucidatypewriter-medium-r-normal-sans-12-120-75-75-m-70-iso8859-1
So in the preceding, the alias is lucidasanstypewriter-12. So your rxvt command would be as follows for this font:
rxvt -fn lucidasanstypewriter-12

12. Initiating svscan in Ubuntu (for djbdns, for instance)

The way DJB conceived djbdns, it would autostart using a line in /etc/inittab. Trouble is, Ubuntu doesn't use /etc/inittab. Instead, Ubuntu uses directory /etc/event.d by processing every file in it. So you create /etc/event.d/svscan with the following contents:
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /command/svscanboot
Be very, very careful to get the right directory for the svscanboot command or it will silently fail and give you all sorts of trouble.

13. Finding All Info About All Partitions

The below command can help you find out all what you need to know about all the partitions: Device name, uuid, label, and mount point (if any):
lsblk -o NAME,LABEL,UUID,MOUNTPOINT

courtesy: troubleshooters


Fonte: 13 Quick Hacks For Linux!

7 Lesser Known But Amazing Linux Desktop Environments


Linux, open source, Linux desktop, Linux desktop environment, Unix Desktop Environment, linux desktop, less known linux desktop, Awesome, AMIWM, Linux news, open source news, tech news, news

Are you looking for undiscovered Linux desktop environments? We bring 7 awesome and unseen ones . 

Monday, October 28, 2013:  Among the many amazing features of Linux, one of the most interesting features is its versatility. We have gone through years and years of the plain and simple operating systems. They look all-so-similar across machines, but if you want your computer to appear and act the way you like, there is nothing like Linux. So we bring to you some interesting, rare and beautiful Linux Desktop Environments.

1. Awesome

Awesome (sic) is one covering window manager and is definitely a good one. The environment uses the Lua scripting language and is highly configurable and extensible in usage. You do not require a mouse, it provides great support for multiple monitors and claims to be as fast as lightning.

2. AmiWM

AmiWM is a simple window manager with a simple goal called emulate the Amiga Workbench. This is for the hardcore Amiga nerds. There's even a patch to make it appear like the original versions of the Amiga Workbench.

3. Mezzo

The Mezzo Desktop Environment is somewhere super cool and still weird. Unlike most desktops that have a desktop where you can put files or menus and sub-menus to categorize and launch things, Mezzo has four corners in the screen, each of them handling a general system task (such as Files or Programs) - with the goal of simplifying user interaction. It is primarily meant for SymphonyOS.

4. UDE

UDE, or the 'Unix Desktop Environment,' is usually described as 'hardcore' desktop environment. It is based on Xlib (not Qt or GTK+, etc.) and, as such, is incredibly easy to port to various systems. UDE brings the 'Hex Menu,' which is triggered by clicking on the window borders. UDE also makes heavy usage of the mouse, going so far as to requiring a three-button mouse in order to use properly.

5. Ratpoison

Ratpoison probably carries the most innovative name around other desktop environments. Why? Because its simple goal is to kill the mouse. The environment is heavily reliable on keyboard commands to interact with the system. Although like all other environments, you can face an initial hump in learning, but once you are through Ratpoison is fast, customisable, easy to use, stable and super fun! Plus, you won't even require too much effort on setting up security for your machine because most of the people won't even know how to operate you computer!

6. Sugar

Just like the name, its audience is sweet too! It is a Desktop Environment aimed towards the kids and education. There are no windows to manage and only one application can be run at one time in full screen. There is no desktop in the program, and there is no concept of files for the user to deal with. The environment provides the user a Journal which provides snapshots of saved application.

7. ROX

While our last list had no file, ROX brings alive the old and famous concept of Linux that states that 'everything is a file'. Unlike the other desktop environment that hide your file system and provide you with a series of launchers, docks, start buttons and shortcut tools, ROX opts to make the file system itself as usable as possible. This helps you work with your system efficiently directly from the file manager. 

Atithya Amaresh, EFYTIMES News Network 

Fonte: 7 Lesser Known But Amazing Linux Desktop Environments

10 FOSS Groups You Need To Know About!

  Are you a believer of the open source movement? We bring to you 10 Free and Open Source groups that are an integral part of the open source movement! 

Linux, open source, open source movement, FOSS, Creative Commons, Free Software Foundation, Open Source Initiative, The Apache Software Foundation, the Linux Foundation
The history of Open source is complex and fascinating. And while every single contribution in the revolution means a lot, there are a few organizations who are so dedicated to the free and open source that the movement is incomplete without them. Here's a list of 10 such groups!
 Thursday, October 10, 2013 Right from the underlying philosophy and the supported licenses to shared and community based process of code creation, it's no secret why terms like "revolution" and "movement" are associated with open source.

1. Creative Commons (CC)

As a big believer in the "open source spirit," it's hard to think of an organization that, while not solely dedicated to safeguarding software freedom, takes that spirit more to heart. Creative Commons licenses, particularly Attribution-ShareAlike 3.0 Unported -- do for all creative works what open source software licenses do for computer programs.

2. Free Software Foundation (FSF)

Both revered and contentious, the FSF is, arguably, the reason that free and open source software exists today. While there are some philosophical differences between free software and open source, the Foundation, founded by Richard Stallman on October 4, 1985, is responsible for many of the cornerstones that open source depends on to this day.

3. Open Source Hardware Association (OSHWA)

While it is still in progress, it is surely an organisation that will be a strong part of the open source's future. The explosion of interest in open source hardware is affecting every corner of the open source community ... and, undoubtedly, it will be for years to come.

4. Open Source Initiative (OSI)

Every community has standard-bearers, and in the open source world, it's the OSI. As maintainers of both the Open Source Definition and the officially approved open source licenses, the Initiative shoulders a lot of responsibility. And, that's on top of global efforts to advocate for and teach about open source software!

5. The Apache Software Foundation (ASF)

Think "Apache" is nothing more than an HTTP server? Think again! The Foundation, which manages nearly 200 separate open source projects, is at the heart of many open source applications, while the Apache License is the legal wrapper around their distribution.

7. The Linux Foundation (LF)

To many people, the story of Linux is the story of open source. So, a foundation that aims to standardize, protect, and promote "Linux by providing unified resources and services needed for open source to successfully compete with closed platforms" is as open source as it gets.

8. The Mozilla Foundation

Champions of open source software who describe themselves as "a non-profit organization that promotes openness, innovation and participation on the Internet," the Foundation is responsible for so much more than the Firefox web browser and Thunderbird email client.

9. The Perl Foundation (TPF)

Often criticized these days for being too cryptic and hard to maintain, the Perl programming language was the open source technology that powered early websites. In fact, PHP was, itself, originally written in Perl. To this day, Perl's regular expression engine and library of over 110,000 community-contributed modules is the envy of and model for many other open source programming languages.

10. The Python Software Foundation

If Perl powered Web 1.0, Python seems to be emerging as the engine behind much of Web 2.5-ish. Between Google's heavy interest in Python and open source hardware's apparent love for the language, a lot of next generation open source software is currently being developed in Python.

Courtesy: About.com

 
Fonte: 10 FOSS Groups You Need To Know About!

10 Tips To Write Expeditious Bash Scripts


10 Tips To Write Expeditious Bash Scripts
Bash is indeed one powerful tool, and here are some tips to make bash scripts more efficient!
Bash the command line interface for many Linux distros is one is one powerful tool. Here we bring to you 10 niche tips which will help you keep your Bash scripts efficient and lean.
  1. Avoid Full Paths to Bash Built-ins
    Bash has many built-ins that can be used instead of calling external commands. You should leverage the built-in commands whenever possible since it avoids calling a sub-command from the system.
    Since Bash has built-ins for some commands found in /bin and /usr/bin (such as echo), avoid using the full path for these commands and the built-in will be used.
    # avoid this
    /bin/echo "hello"

    Use the Bash built-in instead:
    echo "hello"
    Other bash built-ins include: test, read, declare, eval, let pushd and popd. You can refer the bash man page a full listing of built-ins.
  2. Avoid External Commands for Integer Math
    Bash also provides built-ins that can be used for integer arithmetic. Only use /usr/bin/bc if you need to do floating point arithmetic. Integer calculations can be made with these Bash built-ins:
    four=$(( 2 + 2 ))
    four=$[ 2 + 2 ]
    let four="2 + 2"

  3. Avoid using Cat
    Tools like Grep, Awk and Sed will take files as arguments. There is rarely a need to use /bin/cat. For instance, the following is unnecessary:
    # avoid this
    cat /etc/hosts | grep localhost

    Instead, use Grep's native ability to read files:
    grep localhost /etc/hosts
  4. Avoid Piping Grep to Awk
    If using Awk, you can often eliminate the need for grep. Try not to pipe Grep to Awk:
    # avoid this
    grep error /var/log/messages | awk '{ print $4 }'

    Use Awk's native ability to parse text and save yourself a command.
    awk '/error/ { print $4 }' /var/log/messages
  5. Avoid Piping Sed to Sed
    Sed can take more than one command in a single execution. Avoid piping sed to sed.
    # avoid this
    sed 's/hello/goodbye/g' filename | sed 's/monday/friday/g'

    Instead, use sed -e or delimit the sed expressions with a semicolon (;)
    sed -e 's/hello/goodbye/g' -e 's/monday/friday/g' filename
    sed -e 's/hello/goodbye/g; s/monday/friday/g' filename

  6. Use Double Brackets for Compound and Regex Tests
    The [ or test built-ins can be used to test expressions, but the [[ built-in operator additionally provides compound commands and regular expression matching.
    if [[ expression1 || expression2 ]]; then do_something; fi
    if [[ string =~ regex ]]; then do_something; fi

  7. Use Functions for Repetitive Tasks
    Break your script up into pieces and use functions to conduct repetitive tasks. Functions can be declared like so:
    function_name() {
      do_something
      return $?
    }

    Make your functions usable by more than one shell script by sourcing a functions file from the various scripts. You can source another file in Bash using the . built-in.
    #!/bin/bash
    . /path/to/shared_functions

    See the Bash man page.
  8. Use Arrays Instead of Multiple Variables
    Bash arrays are very powerful. Avoid using unnecessary variables:
    # avoid this
    color1='Blue'
    color2='Red'
    echo $color1
    echo $color2

    Instead, use Bash arrays.
    colors=('Blue' 'Red')
    echo ${colors[0]}
    echo ${colors[1]}
  9. Use /bin/mktemp to Create Temp Files
    Need a temporary file? Use /bin/mktemp to create temporary files or folders.
    tempfile=$(/bin/mktemp)
    tempdir=$(/bin/mktemp -d)

  10. Use /bin/egrep or /bin/sed for Regex Pattern Matching
    Think you need Perl? Check out Sed or Egrep (grep -e) for regex pattern matching.
    # grep for localhost or 127.0.0.1 in /etc/hosts
    egrep 'localhost|127\.0\.0\.1' /etc/hosts

    # print pattern localhost.* in /etc/hosts
    sed -n 's/localhost.*/&/p' /etc/hosts
Courtesy: hacktux
 Fonte: 10 Tips To Write Expeditious Bash Scripts

10 Command Line Tricks To Create A Random Password


10 Command Line Tricks To Create A Random Password

Here's time to have some fun with command lines and and create a password that no one can hack (hopefully)!


One amazing part about Linux is that it allows you to do one thing in hundreds of different ways, even if it is something as simple as generating a random password. Here's 10 ways you can do it.

All of these random password commands can be modified to achieve a different password length, or simply use the first x characters of the generated password if you don't want such a long password. We suggest you to use password managers like LastPass so that you don't need to memorize them.

1. This method uses SHA to hash the date, runs through base64, and then outputs the top 32 characters.

date +%s | sha256sum | base64 | head -c 32 ; echo
2. This method used the built-in /dev/urandom feature, and filters out only characters that you would normally use in a password. Then it outputs the top 32.

< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
3. This one uses openssl's rand function, in case this is not installed on your system don't worry, we have a lots of other examples!

openssl rand -base64 32
4. This one works a lot like the other urandom one, but just does the work in reverse. Bash is indeed super powerful!

tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1
5. This example filters using the strings command, which outputs printable strings from a file, which in this case is the urandom feature.

strings /dev/urandom | grep -o ':alnum:' | head -n 30 | tr -d '\n'; echo
6. An even simpler version of the urandom one.

< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6
7. This one manages to use the very useful dd command.

dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev
8. You can even create a random left-hand password, which would let you type your password with one hand.
< /dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c8; echo ""




9. If you're going to be using this all the time, it's probably a better idea to put it into a function. In this case, once you run the command once, you'll be able to use randpw anytime you want to generate a random password. You'd probably want to put this into your ~/.bashrc file.
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;}
You can use this same syntax to make any of these into a function - just replace everything inside the { }
10. not as random as some of the other options, but honestly, it's random enough if you're going to be using the whole thing. And yes, that's much more easy to remember.
date | md5sum
Courtesy: howtogeek


 Fonte: 10 Command Line Tricks To Create A Random Password

7 Most Surprising Places You Will Find Linux!

Did you know that Linux milks cows, runs a motorcycle and makes coffee too?

Linux, open source, strange linux, unexpected linux, linux surprise, Linux motorcycle, Linux Robots, Linux in US Postal Service, Linux Coffee maker, Linux milks the cow, Linux Security Cameras, Linux traffic lights


Thursday, October 17, 2013:  Open source and specifically Linux isn't all about license or a coding methodology, it has already begun to sprout up everywhere apart from just your computer systems and applications. Here's a compilation of some of the more surprising places you'll find your beloved operating system. 

1. US Postal Service

Linux has gone postal. For the past decade, the US Postal Service has relied on a mail sorting system that uses Linux OS at its heart. And for those who really love Linux, there are some Linux themes stamps to decorate their mail which can be found at Zazzle.com.

2. Robots

Isamu is said to be the first humanoid Robot to run on Linux late in 2001. But since then, Linux has become a popular basis for all kinds of robots including Pleo, an animatronic dinosaur toy and the Katana Robotic Arm for industrial applications built by Neuronics.

3. The Linux motorcycle

Mavizen's TTX02 is billed as the first electronic racing motorcycle with an onboard-computer, USB ports and an IP address. This lets the crew tune the bike over a WLAN. It can hit speeds of 130 mph and it's all powered by a Linux system.

4. Coffee maker

This commercial coffee maker was on display at Embedded World in Nurmberg, Germany. It runs on Linux and was built with the Qt framework. It's not available for consumers, but a few years ago a Linux lover published instructions for building your own Linux coffee pot. We say cheers to Penguin-inspired Java.

5. Linux milks the cow

Farm equipment manufacturer, DeLaval made a robotic milking machine that not only runs on Linux (and Windows), but lets the farmer operate it via a wireless, remote control. Now that's what we call milking a free OS.

6. Security Cameras

Linux backs the Zone Minder's home video camera surveillance system. ZoneMinder is an integrated set of applications for surveillance, capture, recording of any CCTV or security camera attached to a Linux-based machine. There is no limit to the number of cameras the app can support, beyond what your Linux machine can handle.

7. Traffic Lights

Next time you're stopped at a traffic light, take a moment to think geek...or rather Peek. Peek Traffic makes a series of Linux-based traffic lights that keeps traffic flowing in places like Iowa, New York and on the 101 in L.A.

Courtesy: CIO 

Fonte: 7 Most Surprising Places You Will Find Linux!

10 Awesome Linux Speed Hacks


Linux, open source, Linux hack, 10 linux hacks, linux hacking, top 10 linux hacks, linux speed hack,







Speed up your Linux machine with these awesome hacks!


Monday, October 07, 2013 Although Linux, the brainchild of Linus Torvalds is an extremely reliable operating system, and rarely needs to be rebooted, but when it does, the speed is a major concern. With Matrix style lines scrolling down the screen, it can make many lose patience. But fortunately, there are ways to speed things up. A majority of these tips are not very tricky all though some of these are unfortunately. Let’s take a look at top 10 speed hacks of Linux and let your Linux box reincarnate with speed.

1. Quick Fixes - Disable unnecessary services to make Linux boot faster

Linux comes in various flavors bundled with a lot of applications. However, most of us don't even use Linux to its full potential. Depending upon the use of the machine, plenty of services and running programs won’t be needed. And if you are using Linux just for a desktop, then you won’t be needing the default send mail, httpd, and many other services. You can also turn off many other services if your Linux box is used as a small web server by going to Administration menu, tweaking the Services entry and deselect all of the services you don’t want to start.

2. Free up Your Kernel - Disable unnecessary kernel modules

If your Linux box is wired to the LAN/Ethernet, then you don’t need to have a wireless kernel module loaded. More services like smartcard modules and others can be disabled and the load can be taken off from the kernel. This task is a bit difficult as it requires recompilation of kernel, which is daunting for even the Linux geeks. To do this, you will need the kernel sources and then follow the standard steps for compiling a kernel. You will be having a ride through the internals of your system just disable all of the kernel modules you don’t need.

For added safety, install Bootchart which will tell you if Kernel modules are properly installed and running on your system. Not only will this give you a good list of modules, it will illustrate for you what is happening during your system boot. You can also issue the command

chkconfig –list | grep 3:on

to find out what services are running. Once you know what loading modules you don’t need, you can remove them during a kernel recompilation. While you’re at it, compile the kernel to exactly match your architecture.

3. Take Load Off Linux - Use a lightweight window manager instead of GNOME or KDE

Using a smaller window manager drastically reduces graphical boot time. Instead of having to wait that extra 30 to 60 seconds for GNOME or KDE to boot up, why not wait two to 10 seconds for Enlightenment or XFCE to boot up? Not only will they save you boot time, they will save your memory and the headache of dealing with bloatware.

4. CUI ROKZ’ - Use a text-based login instead of a graphical login

The graphical logins do two things: increase load times and create headaches trying to recover from an X windows failure. Most of Linux machines which boot to run level 3 instead of run level 5 will halt at the text-based login, where you only have to log in and issue startx to start your desktop of choice. So CUI login is the way to go.

5. The Flying Penguin - Use a lighter Linux distribution

Are You a Linux newbie? Instead of loading the heavyweight SUSE, why not try a DSL, Puppy Linux, or Gentoo? The boot time is less than the more bloated Fedora (SUSE and even Ubuntu). Loading lighter Linux distributions will save you from lot of headaches. Of the larger distributions, OpenSuSE claims to boot the fastest, but between the latest Fedora and Ubuntu, Ubuntu blows Fedora’s boot times away.

6. Get Savvy - Use an OpenBIOS

If you’re tech savvy enough to upgrade your PC’s firmware, you might consider migration to open source BIOS which will allow Linux to actually initialize the hardware as it boots (instead of relying on the BIOS). Also, many open BIOSes can be customised to meet your machine’s specific needs. If you don’t go the open BIOS route, you can at least configure your BIOS to not search for a floppy drive that’s not there or to boot directly to the first hard drive (instead of the CD drive first).

7. DHCP woes - Avoid dhcp

If you are working on a home network (or a small business network) where address lease isn’t a problem, go with static IP addresses. This will keep your machine from having to call out to a dhcp server to get an IP address. If you take this approach, make sure you configure your

/etc/resolve.conf

to reflect your DNS server addresses as well.

8. Hotplug unplugged - If you can spare it, get rid of hotplug

Hotplug is the system that allows you to plug in new devices and use them immediately. If you know your server won’t need this system, delete it. This will cut down on boot time. On many systems, hotplugging consumes much of the boot time. Removing hotplug will vary depending upon the distribution you use.

Although udev has majorly replaced hotplug. But if you’re running an older distribution, this does apply.

9. Initng for the daring ones

The initng system serves as a replacement for the sysvinit system and promises to drastically decrease boot times in UNIX-like operating systems. If you would like to see the initng system in action, you can give the Pingwinek livecd a try.

10. HackerPunk - Use a hack with Debian

If you’re using Debian, there is a simple hack you can use to switch your startup scripts to run in parallel. If you look at the

/etc/init.d/rc

script, you will see:

CONCURRENCY=none

around line 24. Change this line to

CONCURRENCY=shell

and you should see a reduction in boot times.

Courtesy: theprohack


10 Awesome Linux Speed Hacks

Busting The Biggest Myths About Linux!


Here we are killing the 8 biggest fears that non Linux users have before they switch their OS! 

Linux, Open Source, linux myths, linux facts, linux kernel, Linux OS, Linux games, linux and windows, windows 

Tuesday, October 08, 2013 For many years Windows was the only operating system for many computer users. In fact, a majority of these users even didn't know that there was any other OS in the world. And for this reason, Linux, the free and open-source operating system was totally alienated. And slowly when people started to hear about the Linux based OS, many misconceptions started to cloud the free flow of the free and open source OS. So here we are trying to put some light on the real facts by killing the popular misconceptions! 

1. Misconception: Linux is an Operating System (OS)

Actually it is not. Linux is an OS kernel. The kernel is the core of all operating systems, and of course Windows has one too. The quality of the kernel is vital to the running of the OS. If your kernel is slow or buggy, your entire operating system will be slow and buggy. This means more crashes, freezes and hence data loss.

The proper name for an operating system using the Linux kernel would be “GNU/Linux”, because the Linux kernel wouldn’t do much for you without the GNU project software. Although for the sake of readability of this list “Linux” has been used instead of “GNU/Linux” while referring to the operating systems that use the Linux kernel.

2. Misconception: Linux is a command line OS

Well, while command line does makes Linux strong, but it isn't necessary to use them. Different desktop environments like KDE and Gnome looks some what similar to Windows and are a good choice for those who want a break from Windows look and feel. Their are many other choices like Enlightenment, Metacity, IceWM, Blackbox, Window Maker, FVWM etc.

3. Misconception: Linux is for geeks only

Although this was true years ago, as Linux was an infant but it certainly isn’t like that any longer. If you take a careful look at the user interfaces of Linux and Windows, your find Linux much more intuitive than Windows.

4. Misconception: Linux is not compatible with Windows stuff

No to a big extent and yes to a very small extent. For majority of the users, Linux is very much compatible. One can read your emails, open your Office documents, view and edit your photo albums, and do everything that you do on your Windows PC- in fact often with better and faster tools than you’d be able to find on Windows. Flagships of open-source software like The Gimp, Inkscape, OpenOffice and many others, can import, read and often export proprietary file formats like Microsoft Office documents, Photoshop PSDs etc. And these tools can offer you even more than you’re used to. Like your OpenOffice docs can be exported from my document to PDF in just one click. No custom printers installed, no “free” web converters. It’s all natively supported.

Although, a few files can’t be directly opened here but it's not Linux who has to be blamed here. Put your blame to the author software of these files. Would you really want to depend on your software vendors to be able to access your data or would rather use an open-source and standardized format?

And if that does not sound good enough, Linux comes with a Windows translation layer called Wine. Using this layer you can run Windows application on Linux. Basically, it serves as a bridge between Linux and Windows applications. For you that means not giving up your familiar Windows programs.

5. Misconception: Nobody is using Linux

Well, this is one very very wrong concept. Infact a majority of the World Wide Web is standing on the shoulders of Linux and GNU software. Because Linux is modular and secure, it’s the most logical choice for a web server. Not only that, many corporate to tech companies and governments have switched their systems to Linux. It’s cheap, durable and safe. Unlike commercial operating systems, it is maintained by the community.

6. Misconception: Linux doesn’t have technical support

It definitely does, and one can choose between paid and unpaid technical support. Unpaid technical support means that you have to depend on the large number of communities based online, where guidance is available twenty four hours a day. These are basically community of enthusiasts, who love to use and promote Linux and will be more than willing to help you with your problem.

As far as paid technical support goes, there are companies such as Red Hat and Canonical which do just that.

7. Misconception: There are no games for Linux

Well, yes once upon a time, games were a major drawback. This is especially true in terms of volume and we agree that there are a lot more games for Windows than for Linux but the scenario has definitely improved as compared to the past and almost every company today has decided to make a Linux version of their game. Linux now has its own version of all big games like Doom, Quake, Heroes of Might and Magic 3, Civilization 3, Soldier of Fortune, Tribes 2 and many others.

Also games like Sauerbraten, Nexuiz, Wolfenstein: Enemy Territory, UFO: Alien Invasion and Glest are all very much free and very much playable on Linux these days

8. Misconception: You have to ditch Windows to use Linux

And this is infact the biggest misconception. A lot of Linux distributions also offer a Live CD, which lets you to try Linux even without the installation. All you need to do is download, burn, reboot your PC and off you go. Additionally, there are Live USB flash drives versions. Also if you like it after the trial, these Live distributions give you the option of installing Linux alongside Windows. And this way you can use both operating systems on the same computer with no trouble at all. Linux folks have made sure of that, because they know nobody wants to jump into the unknown.

If you don’t want that, there are always alternatives, like the the Virtual Box, which allows you to install Linux on a virtual machine inside your Windows. Also, nobody’s stopping you from running Virtual Box on Linux and running Windows inside Linux.

Courtesy: listverse


Busting The Biggest Myths About Linux!

Tips On Becoming An Ethical Hacker

Tips On Becoming An Ethical Hacker  
 
When in this profession, never engage in 'black hat' hacking. That means intruding or attacking anyone's network without having full permission.    
Rate this news:  (2 Votes)
Friday, October 04, 2013 If viruses and DDoS attacks tickle your fancy, you might consider becoming a legal hacker or an ethical hacker. Various businesses and government-related organizations are quite serious about their network security and thus need to hire ethical hackers to enhance their networks, applications, and other computer systems to prevent data theft and frauds.

hacking, ethical hacking, hacker, job market, opportunities for hackers, IT career, DDoS, hacking basics, how to become ethical hacker




But, the pertinent question is how does the job market look like for ethical hackers? Well, chances are extremely bright! The IT market continues to grow regardless the recent economic turmoil.

How to get Started

If you are yet to start your IT career, you might even consider going for military service. The military offers several interesting IT opportunities, and you might even get paid to go to school, even when you enlist in a part-time branch such as the National Guard or Reserves.

Start with the basics: You can earn your A+ Certification and go for a tech support position. After gaining some experience and additional certification of (Network+ or CCNA), you can move up to a network support or admin role. After few year, you can move up to the role of a network engineer. Don't stop here! Put in some more time to earn security certifications such as Security+, CISSP, or TICSA and look for information security position. When you're there, focus on n penetration testing--and gain some expertise with the tools of the trade. Now, it's time to work toward the Certified Ethical Hacker (CEH) certification introduced by the International Council of Electronic Commerce Consultants (EC-Council for short). But, spend some time in marketing yourself as an ethical hacker.

It is important for a professional hacker to network. You must discover and play with Unix/Linux commands and distributions. You must ensure you also learn some programming -probably C, LISP, Perl, or Java. You also need to spend some time with databases such as SQL.

Soft Skills

Hacking also requires use of so-called soft skills, just like other IT job. You require strong work ethic, impressive problem-solving and communications skills, and ability to stay motivated in tough times.

Ethical hackers must have people skills and talent for manipulation and should have ability to convince others to reveal credentials.

Stay Legal!

When in this profession, never engage in "black hat" hacking- that means intruding or attacking anyone's network without having full permission. When you engage in illegal activities, it might lead to conviction and end your ethical hacking career.

Becoming a Certified Ethical Hacker (CEH)

In order to become a Certified Ethical Hacker (CEH) you need to earn suitable credential from the EC-Council after gaining few years of security-related IT experience. The certification
will help you gain understanding of security from the mindset of a hacker.

The EC-Council normally requires that you to have around two years of information-security-related work experience which must be endorsed by your employer in addition to passing the exam.

Available Resources

If you are interested ethical hacking, you can check the resources section of the EC-Council site. Moreover, a quick Amazon search will result in several books on ethical hacking and the CEH certification, as well. You can even Google the term to find simple hacking how-tos.

Courtesy: PCWorld.com



Fonte: Tips On Becoming An Ethical Hacker

Siga-nos