Some Websites  

Posted by Unknown

Some of My Favourite Linux Apps  

Posted by Unknown in , ,

Htop - Htop is an ncursed-based process viewer similar to top, but it allows to scroll the list vertically and horizontally to see all processes and their full command lines. Tasks related to processes (killing, renicing) can be done without entering their PIDs.

Twitux
- Twitter client for Linux.

GWget
- wget GUI frontend.

CHM Viewer - .chm file viewer for Linux.

VMware - Advanced virtualization software

Wine - Run Windows apps in Linux.

StarDict - One of the best dictionary software.

Terminator - Multiple terminal windows or tabs at once.

Mozilla Prism - Cross-platform application that lets you integrate web applications with your desktop.


How to Recover and Undelete files in Ubuntu the easy way!  

Posted by Unknown in , , ,

Ok I accidentally deleted my /etc/network/interfaces file and didnt have my access point connected to a pc, its just wireless now, so what I did to recover the file was this, please note if you delete the file shutdown your pc immediately or unmount your drive as fast as possible to avoid overwriting the deleted data. This method can be used to find unencrypted passwords and interesting information as well. This works best from a livecd/unmounted filesystem:

  • grep --binary-files=text -300 "Unique String in Text file" /dev/hda1 > output.txt

The -300 option tells grep to report the 300 lines before the string you choose
Basically this will take quite a while depending on the size of your hard drive and may output a ton of irrelevent information to the output.txt file, you may want to edit the -300 line variable and do man grep to see further usage options.

This method worked for me only because I shutdown my pc immediately and booted into my Hardy Livecd and the file was still available, I just copied/pasted the relevant output to my interfaces file.

[update]
Alternatively you can use the strings command to dump all the text on a partition then grep the strings output for the relevent output, Here is an example:

  • strings /dev/hda1 > bigtxtfile
  • grep -i "information" bigtxtfile >grepoutputfile

[update 2]
I ran into another program that should streamline this a bit, havnt had much time to play with it but let me introduce you to "foremost"
Grab foremost:

  • sudo apt-get install foremost

Have Foremost audit your drive for recoverable files:

  • sudo foremost -w -i /dev/hda -o /recovery/foremost

Have foremost recover jpg files:

  • sudo foremost -t jpg -i /dev/hda -o /recovery/foremost

Here is the complete list of recoverable filetypes for usage with the "-t type" switch:
Available types:

jpg Support for the JFIF and Exif formats including implementations
gif
png
bmp Support for windows bmp format.
avi
exe Support for Windows PE binaries, will extract DLL and EXE files
along with their compile times.
mpg Support for most MPEG files (must begin with 0x000001BA)
wav
riff This will extract AVI and RIFF since they use the same file for‐
mat (RIFF). note faster than running each separately.
wmv Note may also extract -wma files as they have similar format. mov
pdf
ole This will grab any file using the OLE file structure. This includes PowerPoint, Word, Excel, Access, and StarWriter
doc Note it is more efficient to run OLE as you get more bang for your buck. If you wish to ignore all other ole files then use this.
zip Note is will extract .jar files as well because they use a simi‐
lar format. Open Office docs are just zip’d XML files so they are extracted as well. These include SXW, SXC, SXI, and SX? for undetermined OpenOffice files.
rar
htm
cpp C source code detection, note this is primitive and may generate documents other than C code.
all Run all pre-defined extraction methods. [Default if no -t is specified]



If you have additional suggestions or methods to restore files please comment and share your knowledge

Source

How to change the orange color which is between the login screen and your fully loaded Ubuntu desktop  

Posted by Unknown in , ,

After you logged in from your ultra cool gdm theme the colour will briefly switch to a anoying orange colour. This can be changed as follows:

Open a terminal and write: sudo gedit /etc/gdm/PreSession/Default

Then change
# Default value
if [ “x$BACKCOLOR” = “x” ]; then
BACKCOLOR=”#dab082″
fi

to

# Default value
if [ “x$BACKCOLOR” = “x” ]; then
BACKCOLOR=”#dab000000″
fi

eLearning for the LPI Certification  

Posted by Unknown in , ,

If you are interested in Linux and want to do a certification then you can opt for LPI Linux Certification. Here is a website where you can download a Live DVD with various materials related to LPI Linux Certification. But there is a problem. The website is in German!

Some more LPI resources from IBM.

VMware, VirtualBox Tips  

Posted by Unknown in , ,


How to backup VMs (VirtualBox)
  • VBoxManage clonevdi /home/user/.VirtualBox/VDI/vm.vdi vm_copy.vdi
This will clone your VM. To restore the VM, just create a new VM in VirtualBox and select the cloned VM as HDD.

Linux Tips  

Posted by Unknown in ,


Ubuntu post-installation packages
  • CHM Viewer
  • StarDict
  • FireStarter
  • GWget
  • Abiword
  • Gnumeric
  • Anjuta
  • VLC Media Player
  • VMware Server
  • Opera
  • Unrar
  • tracker-stats (for tracker statistics)

How to use "history"
  • history (to list the available history items)
  • !n (run the nth command)
  • ctrl + r (then type the command initials)
  • history -c (clear history)
How to reconfigure X in Ubuntu
  • sudo /etc/init.d/gdm stop (optional)(in case of blank screen, else not required)
  • sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
  • sudo dpkg-reconfigure xserver-xorg
  • CTRL+ALT+BACKSPACE or sudo /etc/init.d/gdm start
How to re-index tracker database
  • killall trackerd
  • trackerd -v 2 -R
LVM commands
  • lvdisplay
  • lvremove /dev/vgname/lvname
  • lvcreate -l 100%FREE -n lvname vgname
  • lvresize -L +/-32m /dev/vgname/lvname
  • --> resize2fs -p /dev/vgname/lvname (first e2fsck -f /dev/vgname/lvname)
  • pvdisplay
  • lvm
  • -->vgdisplay
Some RAID commands
  • mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/partition1 /dev/partition2
  • mkfs.ext3 /dev/md0
  • vi /etc/fstab
  • add this line --> /dev/md0 /share ext3 defaults 1 2
How to reset compiz settings
  • gconftool-2 --recursive-unset /apps/compiz

Solaris Tips  

Posted by Unknown in ,


Important Solaris Files


Networking

  • /etc/hosts
  • /etc/hostname."ethernet_card" (pcn0,hme0,e1000g0)
  • /etc/netmasks
  • /etc/inet/ipnodes
  • /etc/nodename

Important Commands

  • ifconfig -a (lists all NIC cards + configuration)
  • fmadm faulty (command to find faulty devices)
  • shutdown -y -g0 -i(0-6)
  • /usr/X11/bin/Xorg -configure
  • /usr/X11/bin/xorgconfig
  • /usr/X11/bin/xorgcfg (recommended) (move resulting "xorg.conf" file to /etc/X11)
  • useradd -u 1025 -g 10 -d /export/home/username -m -s /bin/bash -c "comment username (use UID above 1023)
  • usermod (to modify user)
  • man -k (or apropos) "comman description" (to find a command)
  • catman (to index man pages. use it before using apropos)
  • echo $SHELL (prints your shell)

Some Abbreviations

SMF = Service Management Facility
SAN = Storage Area Network
SMC = Solaris Management Console
SMB = Server Message Block
LUN = Logical Unit Number

(LUNs are normally not individual disk drives but rather virtual partitions (or volumes) of a RAID set. In SCSI, LUNs are addressed in conjunction with the "Controller ID" of the host bus adapter (HBA), the "target ID" of the storage array, and an optional (no longer common) "slice ID". For example, "c1t2d3s4", would refer to controller 1, target 2, disk 3, slice 4)

How to disable root login through telnet, ftp
  • vi /etc/default/login
  • CONSOLE
If this variable is set then root is not allowed to login from anywhere but the console. Commenting this variable out allows root to login from anywhere and allows this vulnerability to take advantage of the telnet exploit. For ftp if the user exists in /usrftpd/ftpusers, that user is not allowed to connect using ftp. Check man page of ftpusers. If you want to enable ftp for root, remove root from /etc/ftpd/ftpusers.

My Favourite Firefox Add-ons  

Posted by Unknown in


Here are some Firefox add-ons I use.
  1. Adblock Plus
  2. Adblock Filter.G Updater (EasyList)
  3. Del.icio.us Bookmarks
  4. Download Helper
  5. Download Statusbar
  6. Foxmarks Bookmark Synchronizer
  7. Google Notes
  8. McAfee SiteAdvisor
  9. NewsFox
  10. ScribFire
  11. Smart Bookmark Bar
  12. StumbleUpon
  13. Tab Mix Plus
  14. VideoDownloader
  15. Wizz RSS
  16. Remember The Milk
  17. CHM Reader