Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Linux Iptables Examples

Up
vote
Down

Linux comes with a host based firewall called Netfilter. It is a set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack. A registered callback function is then called back for every packet that traverses the respective hook within the network stack.

This Linux based firewall is controlled by the program called iptables to handles filtering for IPv4, and ip6tables handles filtering for IPv6. This tutorial list most common iptables solutions required by a new Linux user to secure his or her Linux operating system from intruders. read more...
mail this link | permapage | score:9831 | -nixcraft, December 14, 2011

Unix: Shell Script Wrapper Examples

Up
vote
Down

Shell script wrappers can make the *nix command more transparent to the user. The most common shell scripts are simple wrappers around third party or system binaries. A wrapper is nothing but a shell script that includes a system command or utility.

Linux and Unix like operating system can run both 32bit and 64bit specific versions of applications. You can write a wrapper script that can select and execute correct version on a 32bit or 64bit hardware platform. In cluster environment and High-Performance computing environment you may find 100s of wrapper scripts written in Perl, Shell, and Python to get cluster usage, setting up shared storage, submitting and managing jobs, backups, troubleshooting, invokes commands with specified arguments, sending stdout to stdout and stderr to stderr and much more.

In this post, I will explains how to create a shell wrapper to enhance the basic troubleshooting tool such as ping and host. read more...
mail this link | permapage | score:9707 | -nixcraft, June 24, 2012

PDFedit: A Linux PDF editor

Up
vote
Down

Adobe Acrobat is a commercial tool for manipulating PDF files. Earlier I was using CUPs - printing system, to export PDF files. I’ve also tried out gv for the same purpose. However, I needed complete editing of pdf documents. My search ended with PDFedit software, which is free and open source editor for manipulating PDF documents. The software available in both GUI and CLI (commandline) interface. read more...
permapage | score:9607 | -nixcraft, December 19, 2007

Tutorial: RHEL 5.3 to 5.4 upgrade

Up
vote
Down

Red Hat Enterprise Linux v5.4 has been released and available via RHN for immediate update. The new version includes the kernel-based virtual machine (KVM) virtualization, next generation of developer features and tools including GCC 4.4, a new malloc(). Also included clustered, high-availability filesystem to support Microsoft Windows storage needs on Red Hat Enterprise Linux.

This tutorial explains how to upgrade RHEL v5.3 to RHEL v5.4. read more...
permapage | score:9552 | -nixcraft, September 3, 2009

Beginner Ubuntu Tips

Up
vote
Down

Twenty-five tips for Ubuntu beginners...
Adding another source for software is easy; once you've installed addrepo, you can do it in the terminal by typing something along the lines of addrepo deb http://mirror2.ubuntulinux.nl/ lucid-seveas all.

If you find new repositories online, they will usually give you the right details to enter. You could also do it graphically by going to 'System | Administration | Software Sources | Third Party Software | Add'. read more...
permapage | score:9427 | -Ray, November 9, 2010

Tutorial: Identify Linux bottlenecks with kSar

Up
vote
Down

The sar command collect, report, or save UNIX / Linux system activity information. It will save selected counters in the operating system to the /var/log/sa/sadd file. From the collected data, you get lots of information about your server such as:

1. CPU utilization
2. Memory paging and its utilization
3. Network I/O, and transfer statistics
4. Process creation activity
5. All block devices activity
6. Interrupts/sec etc.

sar output can be used for identifying server bottlenecks. However, analyzing information provided by sar can be difficult, so use kSar, which can take sar output and plot a nice easy to understand graph over period of time. read more...
mail this link | permapage | score:9280 | -nixcraft, December 16, 2009

Download: Linux 3D Client for Starship Traders

Up
vote
Down

[Note: Katrina Kirellii now maintains the Linux and Windows versions of the graphical client. The new code can be downloaded from this page.]

Linux game testers wanted

A new version of the Starship Traders multiplayer strategy game is under development. The new version, ST2, has a 3D interface and includes an X-Window-based client program. ST2 is considerably faster than its WWW predecessor and integrates a graphical display and point-and-click mouse controls with a complete keyboard interface. Linux users are needed to participate in the first test game since no other operating systems are yet supported.

The new server is up and running now and a Linux version of the client is available. The client is a dynamically linked Linux x86 binary and requires the Mesa3D or OpenGL libraries -- which should already be installed on most modern distros. Internet access is also required to play in the test game, of course.

To participate in the game you must download, gunzip, and run the Linux binary as described below. It should connect to the ST2 test game automatically and you will be prompted to log in.

[Here is a screenshot of a sector with a starbase, a planet, a tradingpost, some sector debris, a few fighters, a wormhole, and, if you look closely, a couple of small starships in the lower left quadrant intermixed with the text. This screenshot is with the window at 640x480. For a less cluttered appearance you can click resize -- while playing -- to expand (or shrink) the window.]

Download and setup instructions
  • Right click here
  • select Save ...
  • gunzip sst012.gz (your browser may do this step automatically)
  • chmod 555 sst012
  • ./sst012
... and you should be online.

The source code, released 17 September, 2001, can be downloaded from this page.

The Game

Starship Traders II is a trading and war game set in a universe divided into multiple galaxies. Individual locations within the game, called 'sectors', can contain ports, planets, nebulas, wormholes, and black holes, as well as objects owned by players. Players can park their starships, deploy their fighters, and build starbases in sectors.

Players can earn money ('microbots') by hauling commodities between ports and from planets. These microbots can be used as cash to buy equipment and military hardware at trading posts, or microbots can be used directly in combination with commodities to build fighters or starbases.

Players can deploy fighters and build starbases to guard prime trading territories and valuable sectors or they can use fighters to attack the deployed forces of other players. Players can also attack and destroy the starships of other players that they find.

Players can create teams which are ranked separately from the player standings. Players can apply to a team and the team captain can then either accept or reject the application. Team members can move safely through the fighter and starbase fortifications of their teammates and allied attack-mode starbases will not attack them.

Obviously, as in any multiplayer strategy game, politics and diplomacy can be important. Try to avoid making too many enemies early in the game!

Controls

F1 and F2 will scroll you back and forward in the scrolling portion of the heads-up display. F10, F11, and F12 will select different size windows. Running the client with a -w argument (eg.: sst012 -w) will cause it to load into a normal, resizeable window with the standard borders and window controls. Otherwise, it runs in a full-screen mode which may not include borders.

You can fly around within a sector using the arrow keys and pageup/pagedown. Don't do much of this or you may get lost. As you enter each new sector, you start out in the same relative position that you were in in the previous sector so it's possible to fly far away from the center of a sector and not easily find it again. If that happens, log out and back in to get back to the center of the sector.

Move the mouse over any clickable menu option (those that change color when the pointer is over them) and wait about 2 seconds for a popup tip about that menu item.

There is a log off (quit) command in the menu that logs you out, disconnects from the server, terminates the client, and closes the window. If you go link-dead while playing, however, or are otherwise left with an unresponsive client, press Escape to close the window and terminate the client.

Game play

Routine trading and galaxy exploration can be accomplished with as little effort as clicking Computrade on the heads-up display. You can also click on anything in the top half of the display to select that option. Note that options containing a capital letter can also be selected by pressing the appropriate key. Therefore, pressing the c key is equivalent to clicking Computrade.

Options without a capital letter generally have the hot key designated with parens. For example, "keyboard map (?)" can also be accessed by the '?' key.

Right click on any item in the top half of the heads-up display for a brief explanation of that menu option (and the corresponding keyboard key).

History

Starship Traders II is derived, through a long and meandering lineage, from The Last Resort, which evolved from Tsarwars, itself inspired by Czarwars. Czarwars was a DOS-based BBS game dating back to December, 1986. Czarwars was inspired by Chris Sherrick's version of Trade Wars, which drew it's inspiration from Hewlett-Packard's Star Trader, from The People's Book of Computer Games.

Changlog

5/22/01, v.0.02: Lockup after 5 minutes idle bug fixed
5/24/01, sst004: Menu items change color, Star clusters added
5/24/01, sst005: Popup tips added on clickable items
5/24/01, sst006: Rotating ports
5/26/01, sst007: Bigger, moving fighters, more popup tips
5/26/01, sst008: Moving ships, more popup tips
5/27/01, sst009: All heads-up display items now have popup tips
5/27/01, sst010: Bug fix: resizable window works again
5/29/01, sst011: Colors won't wash out on some displays, cursor added, in-sector movement speed scales better on high-speed displays, bar charts work correctly, bottom line of text doesn't disappear on some window sizes
5/31/01, sst012: minor popup documentation changes
5/12/02, sst012d: bug fix, new menu options added
mail this link | permapage | score:9167 | -Ray, May 12, 2002 (Updated: March 21, 2007)

iozone Tutorial: Measure Linux Filesystem I/O Performance

Up
vote
Down

This article gives you a jumpstart on performing benchmark on filesystem using iozone a free Filesystem Benchmark utility.

Following are few situations where you may be interested in performing a filesystem benchmarking.

=> Deploying a new application that is very read and write intensive.
=> Purchased a new storage system and would like to measure the performance.
=> Changing the RAID level and would like to measure the performance of the new RAID.
=> Changing the storage parameters and would like to know the performance impact of this change

(here are some impact canvas prints) read more...
mail this link | permapage | score:9124 | -nixcraft, July 4, 2008 (Updated: April 24, 2012)

Linux Sysadmin interview: Format and tips

Up
vote
Down

Recently I had to come up with a list of questions and a format for a sysadmin interview. From past experiences and talking to colleagues I found quite a few possible approaches and reasons, but there still are some common rules interviewers should keep in mind.

Use an email quiz to filter out the fakes and save heaps of time. We had a vacancy for a more senior role a while ago and received lots of good CVs. Barely the 2% of the applicants we sent the quiz to came back to us with decent answers, some wouldn't even finish it! Something easy is enough, we asked to describe a step-by-step backup restoration and to do some reformatting on a csv file.

Never scare them! Some people have an hard time during interviews but perform very well when on the job. Obviously you want to consider the emotional factor,especially for a sysadmin, which more than others might end up having to carry out critical tasks under pressure. But don't forget that the type of stress is different, and responding badly to one doesn't mean responding bad to the other, and vice-versa.

Avoid questions that can be answered with a RTFM! Otherwise it's cheaper to buy a parrot and read man-pages to it before bed time. As usual there are limits, some commands and options should be known. But try to prove they can use their brain rather than just remembering things. Possibly come up with problem-solving oriented questions, put together a bunch of different log files and ask them to reconstruct what happened; or ask them to explain you how they would deploy software to a large number of machines.

Leave questions as open as possible, you're moreinterested to understand their approach and attitude rather than in the actual answers (again, this is true to some extent, catch my drift). Invite them to think aloud, that generally works.

Find out if they are passionate about the subject, ask them about their distribution and why they use it (this is also a good way to spot zealots, avoid them as plague!). Ask them why they want to work as sysadmin and if they have particular reasons to apply for a position within your company.

If your company is mostly based on FLOSS, find out their knowledge and interest in free libre software, that is also a good indicator of passion.

Down to the questions (bear in mind the target was a junior admin):

Attitudinal questions

  • Test their knowledge of the "community", who's Linus Torvalds; Richard Stallman; Alan Cox; Eric Raymond, and maybe another few big names like Tanenbaum and Theo De Raadt.
  • Do you run Linux at home?
  • What distribution, why?
  • What project are you most proud of?
  • Why are you leaving your current job?
  • Why do you want this job?
  • Why should we hire you?
  • What is a sysadmin?

Geek questions
This is highly optional, but I'm possibly looking for a geek, and any person applying for a sysadmin position should be able to answer at least the first 2 questions.

  • Can you expand RTFM? BOFH?
  • What's the last man page you've read?
  • Do you read any webcomics?

Generic linux questions

  • What are setuid/setgid in relation to file permissions?
  • What are setuid/setgid in relation to directory permissions?
  • What is an inode?
  • What does init do? What does inetd do?
  • What’s PGP/GPG; Public/Private Key cryptographic systems
  • What’s ssh? Setting up trust between accounts.
  • How does ssl work?
  • What are different directories in / for?
  • What to do , if the newly build kernel does not boot.?
  • Do you know what source management is? have you used it? what software?
  • How does the boot process (init levels) work on Linux

Things we need
Depending on your business there might be some piece of software you heavily use, hence have particular interest for the candidate's knowledge about it Have you used Apache? Talk to me about it. In my case we primarily do web based services so I ask about apache and mysql.

  • What do you know about configuring and/or compiling Apache;
  • Virtual Hosts?
  • .htaccess files?
  • mod_perl? mod_php?
  • log files and log management
  • Are you familiar with SQL?
  • Do you know about indexes?
  • Can you name and explain some of the tables in the mysql database

Cli
We send an email quiz before the interview which includes a scripting test. You might want to setup one for the interview, generally parsing CSV files is a good one.

  • What shell do you use?
  • bash?
  • do you know any other?
  • Name some basic shell command like cut and explain what they do
  • Sed/awk?
  • Which editor? vim/emacs/something else

File systems and disks

  • What is the big difference between ext2 and ext3?
  • What about xfs?
  • Reiserfs?
  • Partitions layout
  • Different raid levels

Networking

  • What’s a hub?
  • Problems with hubs
  • What’s a switch?
  • What’s a router?
  • What’s the difference between UDP and TCP?
  • How would you find what ports are open on a machine (local and remote)?
  • What’s the OSI model? What are the seven levels?
  • How would you capture network traffic?
  • What’s a VLAN?
  • How does DNS work?
  • How does FTP work?
  • How does SMTP work?
  • What's traceroute?

Security

  • Do you know what a chroot is?
  • Do you know what a BoF is?
  • Do you know what an sql injection is?
  • Do you know what a DoS attack is?
  • Do you know what a botnet is?
  • What firewall applications have you used?
  • Can you name the problems of firewalling ftp?

read more...
mail this link | permapage | score:8826 | -Filippo Spike Morelli, May 21, 2007

User Auditing on Linux

Up
vote
Down

A variety of methods exist for auditing user activity in UNIX and Linux environments. Some of them come preinstalled within common distributions, some can be downloaded as freeware, and some are commercially available products. Here are some of the most popular methods for auditing. Each method is described, along with tips for how to make the best use of each method. In addition, guidance is provided to show what type of auditing each method is best suited for. read more...
permapage | score:8815 | -falko, January 2, 2013

Install new skype in Ubuntu 12.04

Up
vote
Down

Skype is one of the best Video calling software,owned by Microsoft.Skype offer lot of features like Video call,Direct Phone call,Chatting and more.
Features: http://www.skype.com/intl/en/features/ read more...
permapage | score:8801 | -Linux Tips, April 6, 2012

Install skype from repository in Ubuntu 12.04

Up
vote
Down

Since Ubuntu 10.04 (Lucid Lynx), Skype is part of the Canonical partner repository. To install Skype add the Canonical Partner Repository. It is highly recommended to use the package provided in the Canonical partner repository, not the one distributed from the skype website...

(here are some nicely precise prints) read more...
permapage | score:8693 | -Linux Tips, April 12, 2012 (Updated: April 24, 2012)

Install Skype in Ubuntu 11.04

Up
vote
Down

Skype hasn’t been uploaded to the official partner repository of Ubuntu 11.04 Natty Narwhal. So for those who are trying out Natty out there will need to install Skype from their website. Below is the steps for that. read more...
permapage | score:8677 | -Linux Tips, January 11, 2011

Wake Linux with Cron

Up
vote
Down

Here's how to wake up your sleeping Linux system with a cron job...
Here's the latest in our new series on OS tips from power users: a seemingly trivial task. You have a computer, most likely a laptop, that you wish to keep suspended while you're not working. For example, let's say overnight. At the same time, you wish to run a handful of maintenance tasks, like backups and cleanup, which you don't normally do during the day. So you need a mechanism that will send your machine to sleep, wake it up when necessary, run cron jobs, then send it back to sleep again.
read more...
mail this link | permapage | score:8667 | -Ray, December 15, 2010

Customize Linux Mint 10

Up
vote
Down

After a review of Linux Mint 10, the next logical step is to write a few tutorials and tips for those that might need it. The first of these tutorials is a very basic one: It will present several steps you can take to customize a new installation of Linux Mint 10.

The list of tips that will be presented covers basic desktop customizations, enabling and configuring Gufw, the graphical firewall client, and installing standard GNOME games. read more...
permapage | score:8646 | -finid, November 27, 2010

Handy shell aliases for Linux/Unix

Up
vote
Down

An alias is nothing but shortcut to commands. The alias command allows user to launch any command or group of commands (including options and filenames) by entering a single word. Use alias command to display list of all defined aliases. You can add user defined aliases to ~/.bashrc file. You can cut down typing time with these aliases, work smartly, and increase productivity at the command prompt. read more...
permapage | score:8574 | -nixcraft, June 11, 2012

Tips to dual-boot Linux and Windows

Up
vote
Down

Tip Number 4: Every tip in this article is important, but this is even more so. When attempting to dual-boot on a computer with one hard drive, do not install Linux or make the mistake of installing Linux on the same partition that Windows is installed on. That is the same thing as deleting your C drive. So look before you install. read more...
permapage | score:8547 | -finid, September 15, 2012

Change Linux passwords with a PHP web script

Up
vote
Down

This article shows how to change a system password using a web based PHP script. This is one the essential tasks that many new sys admin find it little difficult as they are not familiar with PHP.

Using concept presented in this article one can write extended edition with any other programming language such as Perl or Python. read more...
permapage | score:8527 | -nixcraft, August 5, 2006

Restrict users to SCP and SFTP with Chrooted rssh on RHEL

Up
vote
Down

FTP is insecure protocol, but file-transfer is required all time. You can use OpenSSH Server to transfer file using SCP and SFTP (secure ftp) without setting up an FTP server. However, this feature also grants ssh shell access to a user.

In this article series we will help you provide secure restricted file-transfer services to your users without resorting to FTP. It also covers chroot jail setup instructions to lock down users to their own home directories (allow users to transfer files but not browse the entire Linux / UNIX file system of the server) as well as per user configurations. read more...
mail this link | permapage | score:8520 | -nixcraft, January 2, 2008

Make Ubuntu 11.10 multimedia ready

Up
vote
Down

The Ubuntu Restricted Extras will install Adobe Flash Player, Java Runtime Environment (JRE) (sun-java-jre) with Firefox plug-ins (icedtea), a set of Microsoft Fonts (msttcorefonts), multimedia codecs (w32codecs or w64codecs), mp3-compatible encoding (lame), FFMpeg, extra Gstreamer codecs, the package for DVD decoding (libdvdread4, but see below for info on libdvdcss2), the unrar archiver, odbc... read more...
permapage | score:8484 | -Linux Tips, October 27, 2011
More articles...
Abstract Art Online Gallery

Recent headlines

10 basic examples of Linux ps command

Giada – Audio tool for DJs, live performers and electronic musicians

Dual-boot Windows 7 and Ubuntu 12.04 on a PC with UEFI board, SSD and HDD

LG 8-inch G Pad 8.3 Android tablet

Epoptes – Open source computer lab management and monitoring tool

HowTo: HTTP Status: 206 Partial Content and Range Requests Using Curl

Upgrade Fedora 18 to 19 With FedUp

Hand of Thief trojan and your favorite Linux distribution

Install openQRM 5.1 on Debian 7

Tutorial: Create an NFS-like Storage Server with GlusterFS on Ubuntu 12.10

Tutorial: Automatically add a disclaimer to emails with alterMIME (Postfix on Debian 6)

Ubuntu Edge: Is there life after an unsuccessful crowd-funding campaign?

Tahoe Least-Authority File System for secure, distributed data storage

webOS: The latest Linux distribution

Using Multiple PHP Versions (PHP-FPM FastCGI) With ISPConfig 3 (Ubuntu 12.04)

Tutorial: Running CS-Cart on Nginx on Debian 7/Ubuntu 13.04

Tutorial: Webcam streaming your desktop plus audio with ffmpeg, crtmpserver, Flowplayer

Elementary OS 0.2 Luna review

Stella: RH/CentOS 6.3 based Desktop OS

ATA over Ethernet (AoE) (Ubuntu 12.04)

Pre-release Ubuntu 12.10 has partial support for manual LVM and disk encryption

Setup Nginx + php-FPM + apc + MariaDB on Debian: The perfect LEMP server

StartOS 6 GNOME 3 and KDE preview

PC-BSD 9.1 preview

Run Unity desktop on Linux Mint 12

Linux Iptables Examples

Plasma Media Center 1.1 and digiKam 3.3

OpenShift Online: a non-developer guide

Tutorial: Install Debian 7 (testing) with debootstrap from a Grml live Linux

Nuvola Player: Enjoy all your Cloud music services from one interface

How to install Orange in Ubuntu 13.04

Increase file descriptors for Transmission on Linux

Tutorial: Debian 7 Samba Server with tdbsam

Installing FreeIPA with Replication

Detailed Error Handling In Bash

LinSSID – Graphical wireless scanning for Linux

Apple DIY Repair

High-resolution text console with uvesafb in Debian/Ubuntu

Using OpenVZ on Debian 7 (AMD64)

Triple-boot Windows 7, Ubuntu 12.10 and Fedora 18 on one HDD

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin