Archive for the ‘Linux/Unix’ Category

Why Linux doesn’t come with a defrag utility

tux_file_linux
A while back I tried to explain to someone why I am never really concerned about the need to defrag my linux systems, well at least not nearly as much as any windows system. This site is one of the simplest explanations I have seen so far. Why doesn’t Linux need defragmenting?

Format and Partition a Second Hard Drive in Linux – (ext3)

tux_file_linux
For the purpose of this example, a second hard drive was installed into a Linux system where the drive is recognized as /dev/hdb. Only one partition will be made in the following example./dev/hdb1. fdisk First, you will need to run the fdisk command in order to partition the disk. For this example, I only want to create one ext3 partition. Here is an example session: [root@linux2 etc]# fdisk /dev/hdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building...

Start, Stop, Restart Linux Services

tux
Starting, stopping, and restarting services varies depending on the distro to some degree But the general concept is the same. One way to list the services is to run “ls” on the “init.d” directory. # ls /etc/init.d I will use “restart” for the examples but this can be replaced with “start” or “stop”. And because the networking service is a fairly common service to restart I will also use that in the following examples. Also, depending on...

List Physical Memory in ESX (Linux)

term_icon
To do this use the “dmidecode” command. This command has many more functions which you can read more  HERE . But for the task at hand… listing the physical memory issue the following command: dmidecode -t memory

Linux Directory Structure (Visual FHS)

This structure could vary from distro to distro but this is a very generic linux directory structure taken from Ubuntu.The directory structure in Linux can be confusing for new users of Linux and even some experienced users tend to forget what is what from time to time. Most distributions have the same general structure of the base directory system. Ubuntu File/Folder structure

Add Back Track 4 Repo to Ubuntu

First you need to add the repo to the source list. Either do this through Synaptic or manually editing the file at “/etc/apt/sources.list” deb http://archive.offensive-security.com pwnsauce main microverse macroverse restricted universe multiverse Now that the source is added you need to import the archive gpg key. wget -q http://archive.offensive-security.com/backtrack.gpg -O- | sudo apt-key add - Thats basically it. Now the Back Track software should show in the Synaptic Package Manager. For...

Remove disk quota checking for HP-UX

hp-ux_small
chmod ugo-x /usr/bin/quota /usr/sbin/edquota

Change IP info using config file in Linux (Debian/Ubuntu)

This is just an emple of a the interfaces file which holds the ifconfig information. Location: /etc/network/interfaces Static IP (example) ####################### auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 208.88.34.106 netmask 255.255.255.248 broadcast 208.88.34.111 network 208.88.34.104 gateway 208.88.34.110 ####################### DHCP (example) ####################### auto lo iface lo inet loopback auto eth0 iface eth0 inet...

Mount ISO as cdrom in Linux

To mount an ISO: mount -o loop /path_to_iso/filename.iso /mnt/cdrom To unmount the ISO when done: umount /mnt/cdrom

Setup PuTTy for VT320 Emulation

putty
At my current job we currently use a way over priced termail emulator to connect to our HP-UX (unix) server. This emulator supports vt320 emulation which is needed to use the function keys which is setup as shortcuts for our staff. The software is very outdated and to renew would be very expensive. Seeing that I am a big fan of putty I have been advocating a switch to it but ran into some problems during some testing, mainly the function keys would not work. I knew it had to be the emulation. After...
Twitter Delicious Facebook Digg Stumbleupon Favorites More
323 queries in 3.877 seconds.