background preloader

Linux tips every geek should know

Linux tips every geek should know
What separates average Linux users from the super-geeks? Simple: years spent learning the kinds of hacks, tricks, tips and techniques that turn long jobs into a moment's work. If you want to get up to speed without having to put in all that leg-work, we've rounded up over 50 easy-to-learn Linux tips to help you work smarter and get the most from your computer. Enjoy! UPDATE: If these tips aren't enough and you want even more, make sure you check out More Linux tips every geek should know! #1: Check processes not run by you Difficulty: Expert Application: bash Imagine the scene - you get yourself ready for a quick round of Crack Attack against a colleague at the office, only to find the game drags to a halt just as you're about to beat your uppity subordinate - what could be happening to make your machine so slow? OK, let's list all the processes on the box not being run by you! ps aux | grep -v `whoami` Or, to be a little more clever, why not just list the top ten time-wasters: find . reset

Linux Compose Key I often need to type characters that aren’t on the keyboard, like ½ ÷ © ¥ or ¢. On Mac, they’re done with the [option] key, but not always intuitive. For example: © is [option]-G and £ is [option]-3. On Windows, it’s horrible. On Linux, though, they have the most brilliant intuitive way of doing this: You pick a key on your keyboard you don’t use much, like [Insert], [CapsLock], or [menu], and make it the “compose key”. Then to make any character, you just hit the compose key, then type the two obvious keys that, when combined, make up the character. For example: To get ©, just type c then o (Get it? It’s like drawing with your keyboard! Best of all: I never need to read a manual. See the Wikipedia page for more info. (Windows people, don’t despair. (Photo Ⓒ by Jim Sher.)

Mastering the Bash History – Make Tech Easier The Bourne Again Shell, better known as bash, is the default for most Linux distributions. It’s extremely powerful as far as command shells go, and holds all kinds of nifty tricks for those willing to learn. One of the best features is, in my opinion, the command history system. There are many options to use with the bash history, some of them I use nearly every time I open a command shell. Today I’ll be covering some of the most useful aspects of the history, but I certainly won’t be able to cover them all. Up/Down Arrows Many of you probably know this one, but for anyone who doesn’t, it’ll make your life a lot easier. A similar feature to the one listed above is the double bang (!!). Bash will substitute the !! This also works further backward, you can do something like to recall the command 5 entries back in the history. ! Perhaps a few days ago you typed a long, complex command into your shell, for example a series of options for “wterm”. Be careful with this one. !? Ctrl-R Manual Search !

Migrate to a virtual Linux environment with Clonezilla How to convert a physical server to a virtual one using the open source tool Clonezilla Live Ting LiPublished on April 21, 2009 Thanks to two concepts driving the data center today—economy and green computing—server virtualization is a hot topic in the IT world and a lot of hardware and software vendors are offering solutions. Virtualization solutions can have several benefits: they can let you easily migrate a virtual machine from one server to another, and let you provision a virtual as a reproducible clone image for, say,software development and testing. The process for achieving virtualized server consolidation depends on your starting point: If you are designing your system from scratch, you will likely implement virtualization from the ground up.If your system already exists in the physical state, you will probably want to migrate from the physical environment to the virtual one. Introducing Clonezilla Live Virtualization and system migration tools Step 1. Clonezilla tips Figure 1.

Linus Says, Linux Not Designed A thread on the lkml started innocently enough about proper spacing in source code, then grew and grew into a somewhat philosophical debate about evolution and code design. The subject of the thread was "Coding style - a non-issue" , the general consesus that ' scripts/Lindent ' solved the problem, a one line bourne shell script that executes indent with the "proper" options, as defined in the Documentation/CodingStyle document. The script: indent -kr -i8 -ts8 -sob -l80 -ss -bs -psl "$@" However, before long a debate was sparked, leading to some interesting comments by Linus and some others, perhaps best summarized by Alan's comment: "Engineering does not require science. What follows is a reprint of many of the more insteresting posts by some well known Linux kernel hackers: Peter's posting was the beginning of this thread. From: "Peter Waltenberg" To: linux-kernel-mailing-list Subject: Coding style - a non-issue Date: Thu, 29 Nov 2001 09:29:26 +1000 The problem was solved years ago. rules.

58 Cool Hacks - LXF Wiki From LXF Wiki (Originally written for Linux Format issue 58, October 2004) Increase your guru points and apply these cunning hacks to boost performance, secure your system and increase productivity - or fun! One of the great things about Linux is that there's usually more than one way to do something. DISCLAIMER: Obviously, anything you do to your computer is your responsibility, and while we have made every effort to test these hacks, your mileage may vary. Fix a wonky terminal Difficulty: Easy Application: bash We've all done it - accidentally used less or cat to list a file, and ended up viewing binary instead. reset and all will be well again. Creating Mozilla keywords Difficulty: Easy Application: Firefox/Mozilla A useful feature in Konqueror is the ability to type gg onion to do a Google search based on the word onion. Now select the entry in the bookmark editor and click the Properties button. Running multiple X sessions Difficulty: Easy Application: X #!

32 Best Linux Desktop Customization #4 Voici la quatrième édition des meilleures personnalisations de bureaux Linux. Six mois se sont écoulés depuis la dernière présentation, les tendances n'ont pas beaucoup évolué, sauf peut-être que l'on voit de plus en plus de customizations à base de KDE (cf. 6 derniers screenshots). Je vous laisse les découvrir sans plus attendre. Gaia10 Linux by Gabriela2400 GTK & Metacity: SproutPidgin iconset by Gabriela2400Covergloobus by Gabriela2400Conky: 5 individual configs made by Gabriela2400Wallpaper: See The WorldAWN: Skin by Gabriela2400Dock icons: Gaia IconsSource Ubuntu Linux by Transitmapsetc Theme: Equinox (with Faenza icons)Wallpaper: Wild Shine by Mohammad JavadFont: Domestic Manners (one of the Dustimo fonts)Ubuntu-Tweak added (for clear menus etc)Docky theme: Glass Sensualite by iHackr Re-upped 2nd by Sowizz Source Boxed by Afteroid GTK: by me, inspired by droidEmerald: by me, inspired by Gaia SproutIcons: A lot of different Themes. Loser by StingBL Arch Desktop 2010 by kjell81d Source Source

HOWTO: using gprof with multithreaded applications What is gprof? gprof is the GNU Profiler, a tool used when tracking which functions are eating CPU in your program. Anyway, you should already be familiar with it if you got interested in this page. One problem with gprof under certain kernels (such as Linux) is that it doesn’t behave correctly with multithreaded applications. Workaround There is an easy, but surprisingly not very widespread fix for this annoying gprof behaviour. Example It wouldn’t be too hard to put a call to setitimer in each function spawned by a thread, but I thought it would be more elegant to implement a wrapper for pthread_create. Daniel Jönsson enhanced my code so that it could be used in a preload library without having to modify the program. History of this document 13 Dec 2004: use __attribute__((constructor)) instead of _init, and converted to UTF-8. 28 Aug 2003: added Daniel Jönsson’s modifications to use the wrapper in a preloaded library. 5 July 2002: featured on Slashdot!

BashPitfalls - Greg's Wiki This page is a compilation of common mistakes made by bash users. Each example is flawed in some way. 1. for f in $(ls *.mp3) One of the most common mistakes BASH programmers make is to write a loop like this: for f in $(ls *.mp3); do # Wrong! Yes, it would be great if you could just treat the output of ls or find as a list of filenames and iterate over it. There are at least 6 problems with this: If a filename contains whitespace (or any character in the current value of $IFS), it undergoes WordSplitting. You can't simply double-quote the substitution either: for f in "$(ls *.mp3)"; do # Wrong! This causes the entire output of ls to be treated as a single word. Nor can you simply change IFS to a newline. Another variation on this theme is abusing word splitting and a for loop to (incorrectly) read lines of a file. IFS=$'\n' for line in $(cat file); do … # Wrong! This doesn't work! So, what's the right way to do it? If you don't need recursion, you can use a simple glob. 2. cp $file $target 3.

HTG Explains: The Linux Directory Structure Explained If you’re coming from Windows, the Linux file system structure can seem particularly alien. The C:\ drive and drive letters are gone, replaced by a / and cryptic-sounding directories, most of which have three letter names. The Filesystem Hierarchy Standard (FHS) defines the structure of file systems on Linux and other UNIX-like operating systems. However, Linux file systems also contain some directories that aren’t yet defined by the standard. / – The Root Directory Everything on your Linux system is located under the / directory, known as the root directory. /bin – Essential User Binaries The /bin directory contains the essential user binaries (programs) that must be present when the system is mounted in single-user mode. /boot – Static Boot Files The /boot directory contains the files needed to boot the system – for example, the GRUB boot loader’s files and your Linux kernels are stored here. /cdrom – Historical Mount Point for CD-ROMs /dev – Device Files /etc – Configuration Files

Linux Headquarters: Samba Configuration - Introduction Samba can be used to allow connectivity between Linux and Windows(95,98,NT,2000). Samba can be used to share printers, share directories, connect to an NT domain, and many other useful features. However, this tutorial explains the steps involved in basic configuring Samba for file and print sharing. For more complex topics, visit the Samba website or type the command man smb.conf on a Linux machine with Samba installed. Configuring Samba is done by editing the configuration file /etc/smb.conf that is usually located under the /etc directory. Everytime you modify this file, Samba must be restarted for the changes to take effect.Basic Samba InformationStarting, Stopping, and Restarting Samba Luckily there and all lenders might be and levitra professional these it back within weeks. Most Linux distributions come with scripts to start, stop, and restart Samba properly. Using Samba with Windows NT 4.0 Service Pack 3 or higher Samba Website

Related: