background preloader

How To

Facebook Twitter

Simplifying Firewall Management. GitHub - lkettenb/sound-output-switcher: A indicator applet for the Ubuntu Unity desktop to switch the sound output. How to hot-swap SATA drives in Linux. Q I have several 500GB SATA hard drives with all my movies on them.

How to hot-swap SATA drives in Linux

Instead of putting them on a server and running them across the wire, I have chosen to have a removable tray in my media computer. The only problem is that I must shut down the computer to change hard drives. I want to be able to hot-swap disks, but I'm not aware of a way to do that under Linux, as the drive tables are loaded when the kernel is brought up. A What you are looking for is hotplugging on SATA, which is dependent on the hardware in two areas. The drive caddy system you use must be hot-swappable; most are, but check before you buy. Tail -f /var/log/messages while pulling and replacing the drives. Echo '/dev/sdb1' >>/etc/pmount.allow echo '/dev/sdc[123]' >>/etc/pmount.allow echo '/dev/sdd*' >>/etc/pmount.allow The first allows one particular partition to be mounted by pmount, the second example permits three specific partitions on a drive, while the third lets through every partition on a drive.

Keep Your Linux SSH Session From Disconnecting. I’m the type of geek that has an SSH client open at all times, connected to my most frequently used servers so that I have instant access for monitoring and anything else.

Keep Your Linux SSH Session From Disconnecting

As such, it irritates me greatly when I get disconnected, so I’m sharing a few methods for keeping your session alive. You can configure the ssh client to automatically send a protocol no-op code code every number of seconds so that the server won’t disconnect you. This is setting is sometimes referred to as Keep-Alive or Stop-Disconnecting-So-Much in other clients. Global Configuration Add the following line to the /etc/ssh/ssh_config file: ServerAliveInterval 60 The number is the amount of seconds before the server with send the no-op code.

DEVICE AND NETWORK SETUPS ON UBUNTU - Karnataka Open Educational Resources. Your IP address is something you probably rarely think about, but it's vitally important to your online lifestyle.

DEVICE AND NETWORK SETUPS ON UBUNTU - Karnataka Open Educational Resources

Without an IP address, you wouldn't be able to get today's weather, check the latest news or look at videos online. Why? Because without your IP address, websites like whatismyipaddress.com, CNN or ESPN wouldn't know where to send the information you asked for. They wouldn't be able to get it to YOUR computer. Your web browser announces your IP address to any web site, so our website can find your IP address simply by listening for this announcement... Loops - Bash Scripting Tutorial. Loops!

Loops - Bash Scripting Tutorial

Round and round we go. Introduction Bash loops are very useful. In this section of our Bash Scripting Tutorial we'll look at the different loop formats available to us as well as discuss when and why you may want to use each of them. Install vnc server and client on Linux and Setup remote desktop sharing on KDE. VNC stands for Virtual Network Computing or in simple terms its ‘Remote Desktop’.

Install vnc server and client on Linux and Setup remote desktop sharing on KDE

It allows a system to access the desktop of another system. Now lets see how vnc can be done on ubuntu. Install Packages $ sudo apt-get install vnc4server xvnc4viewer 1. vnc4server – This is the vnc server application. Setup the vnc password. HowTo: Add Pause Prompt In a Shell Script ( bash pause command ) Revive Your Old PC: The 3 Best Linux Systems For Old Computers. Windows 8 may be lighter than Windows Vista, but it’s nowhere near as lightweight as these free Linux distributions.

Revive Your Old PC: The 3 Best Linux Systems For Old Computers

If you have an old Windows XP PC or a netbook, you can revive it with a lightweight Linux system. All of these Linux distributions can run from a live USB drive, so you could even boot them directly from a USB drive. This may be faster than installing them to the computer’s slow, aging hard drive. Puppy Linux Puppy Linux is designed to be extremely lightweight.

Puppy Linux has very low minimum system requirements and requires only 128 MB of RAM, although at least 256 MB of RAM is recommended. VectorLinux Light VectorLinux Light is the lightweight edition of Vector Linux. VectorLinux Light isn’t optimized for booting from a USB drive and running from RAM in the same way that Puppy Linux is. How to Quickly Create a Text File Using the Command Line in Linux. If you’re a keyboard person, a lot of things can be accomplished simply using the command line.

How to Quickly Create a Text File Using the Command Line in Linux

For example, there are a few easy-to-use methods for creating text files, should you need to do so. NOTE: When we say to type something in this article and there are quotes around the text, DO NOT type the quotes, unless we specify otherwise. The first method for creating text files uses the “cat” command. Type the following command at the prompt and press Enter. How To Use ps, kill, and nice to Manage Processes in Linux. Introduction A Linux server, like any other computer you may be familiar with, runs applications.

How To Use ps, kill, and nice to Manage Processes in Linux

To the computer, these are considered "processes". While Linux will handle the low-level, behind-the-scenes management in a process's life-cycle, you will need a way of interacting with the operating system to manage it from a higher-level. In this guide, we will discuss some simple aspects of process management. How to restore default GNOME Panels in Ubuntu. So you’ve removed a desktop panel you wished you hadn’t, ditched an applet you now realised you were quite fond of or you just long for the halcyon days when your desktop panels were all neat and tidy like a fresh install, right?

How to restore default GNOME Panels in Ubuntu

This script from starryhope.com is there to help. It allows you to restore default panel settings and save a snapshot of your current panel set-up to restore from at a later date. Download the following archive, save it somewhere accessible, locate it, right click on it and choose ‘Extract here’. Double-click on the’ PanelRestore.sh’ script that results to run. How to add and remove users on CentOS 6 VPS. - Knowledgebase - VelociHOST Inc. How To Add and Delete Users on a CentOS 7 Server. Introduction When you first start using a fresh Linux server, adding and removing users is one of the most basic tasks that you should know how to do.

How To Add and Delete Users on a CentOS 7 Server

When you create a new server, you are only given the root account by default. While this gives you a lot of power and flexibility, it is also dangerous to regularly use an account with so much power; for example, a root user is more vulnerable to security exploits, since any commands run under that account can affect the server's entire filesystem. It is almost always a better idea to add an additional, unprivileged user to do common tasks. How to Add a User and Grant Root Privileges on CentOS 6.5. How To Edit the Sudoers File on Ubuntu and CentOS. Introduction Privilege separation is one of the fundamental security paradigms implemented in Linux and Unix-like operating systems. Regular users operate with limited privileges in order to reduce the scope of their influence to their own environment, and not the wider operating system.

A special user, called root, has "super-user" privileges. This is an administrative account without the restrictions that are present on normal users. How to use the MTR tool to analyse network problems. Uninstall any Program in Linux (Ubuntu 14.10) How to change the hostname of a Linux system. Normally we will set the hostname of a system during the installation process. Many peoples don’t care about this, and don’t change the hostname even if for example this was set to something really stupid by the datacenter that installed the system (most likely they will set this to “debian” on any debian installation, etc).

For me, it is important to see on each one of the ssh screens I will have open at any time a different hostname that is relevant and will give me quickly the information on what system I am logged in. Change the hostname on a running system On any Linux system you can change its hostname with the command ‘hostname’ (surprised?) … Here are some quick usages of the command line hostname: hostname without any parameter it will output the current hostname of the system. How to Scrape Web Pages from the GNU/Linux Shell. You can quickly scrape Web pages in a rough manner with the Lynx Browser and grep (and other tools that will be explained in the near future). Lynx is able to dump the contents of Web pages in two ways: only the text of the page, or the entire HTML source of the page.

To extract the text of a Web page with the HTML tags stripped out, you can use the -dump option like this: lynx -dump " If you want the entire source code, you can use the -source option: lynx -source " Manipulating Data on Linux. If you’re coming from Windows, the world of the Linux command line can be perplexing - you have to know what you want before you can do anything - there’s nothing to click, no wizards, few hints. So let me supply a few… I assume you’ve been forced to the Linux shell prompt somewhat against your will and you have no burning desire to learn the cryptic and agonizing commands that form the basis of xkcd and other insider jokes. Linux / Unix: Add Line Numbers To Files. I know how to display line numbers using vim text editor.

View topic - How could I run iMacros under Linux? Screen Scraping for Fun and Profit. Text processing - Remove last character from line. Understanding the Load Average on Linux and Other Unix-like Systems. Linux, Mac, and other Unix-like systems display “load average” numbers. These numbers tell you how busy your system’s CPU, disk, and other resources are. How to use same id_rsa key on multiple machines. HowTo: Setup SSH Keys on a Linux / Unix System.