Linux Remove All Partitions or Data And Create Empty Disk

Use the following dd command to remove data from /dev/hdX:

dd if=/dev/zero of=/dev/hdX bs=512 count=1

OR for sata disk, use the following syntax:

dd if=/dev/zero of=/dev/sdX bs=512 count=1

In this example, empty sata disk /dev/sdb, enter (you must be login as the root user):

fdisk /dev/sdb
dd if=/dev/zero of=/dev/sdb bs=512 count=1
fdisk -l /dev/sdb
Share

TimeZone adjust in Linux

 

For Redhat/CentOS/Fedora/SL distribution
Type the redhat-config-date command at the command line to start the time and date properties tool, run:
# redhat-config-date
OR type setup and select time zone configuration. This tool is recommended for remote ssh text based sessions.
# setup
Select timezone configuration. Just follow on screen instructions to change the timezone.
If you are using Debian / Ubuntu Linux
To change the timezone for you run the following command as root user:
# dpkg-reconfigure tzdata
Again, just follow on screen instructions.
Share

Set date/time permanently on Virtualbox Guest

First you need to ssh to the server and be root and then do these step by step:

1. Set the date/time as following format

date -s “2 OCT 2013 18:00:00″

2. Set the proper Timezone for your area-

# cd /etc
# ln -sf /usr/share/zoneinfo/EST localtime

3. Set it to the BIOS for permanent stamp-

# /sbin/hwclock –systohc

On Debian/Ubuntu sytem:

dpkg-reconfigure tzdata

BDST NTP Server:

bsti1.time.gov.bd
bsti2.time.gov.bd

Use tzdata on Centos System:

To use it first download the tzdata package from the repo.

$ sudo yum -y install tzdata
$ tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none – I want to specify the time zone using the Posix TZ format.
#?

Select a value and press the return key to proceed.

You will now be asked a country to select from the list provided.

Please select a country.
1) Aaland Islands 18) Greece 35) Norway
2) Albania 19) Guernsey 36) Poland
3) Andorra 20) Hungary 37) Portugal
4) Austria 21) Ireland 38) Romania
5) Belarus 22) Isle of Man 39) Russia
6) Belgium 23) Italy 40) San Marino
7) Bosnia & Herzegovina 24) Jersey 41) Serbia
8) Britain (UK) 25) Latvia 42) Slovakia
9) Bulgaria 26) Liechtenstein 43) Slovenia
10) Croatia 27) Lithuania 44) Spain
11) Czech Republic 28) Luxembourg 45) Sweden
12) Denmark 29) Macedonia 46) Switzerland
13) Estonia 30) Malta 47) Turkey
14) Finland 31) Moldova 48) Ukraine
15) France 32) Monaco 49) Vatican City
16) Germany 33) Montenegro
17) Gibraltar 34) Netherlands

Select and confirm the selection with 1 for Yes.

This completes the setup but to make it permanent you should add the following line to your ~/.bashrc file.

TZ=’Europe/London’; export TZ

Then log out and back in again.

The user can now log in and run the date command

$ date

Fri Jul 19 14:56:53 BST 20

On Centos 7

To list all available time zones, you can either list the files in the /usr/share/zoneinfo directory or use the timedatectl command.

timedatectl list-timezones
...
America/Tijuana
America/Toronto
America/Tortola
America/Vancouver
America/Whitehorse
America/Winnipeg
...

Once you identify which time zone is accurate to your location, run the following command as sudo user:

sudo timedatectl set-timezone your_time_zone

For example, to change the system’s timezone to America/Toronto:

sudo timedatectl set-timezone America/Toronto

Run the timedatectl command to verify the changes:

timedatectl
Local time: Wed 2019-02-06 17:47:10 EST
Universal time: Wed 2019-02-06 22:47:10 UTC
RTC time: Wed 2019-02-06 22:47:10
Time zone: America/Toronto (EST, -0500)
NTP enabled: no
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Sun 2018-11-04 01:59:59 EDT
Sun 2018-11-04 01:00:00 EST
Next DST change: DST begins (the clock jumps one hour forward) at
Sun 2019-03-10 01:59:59 EST
Sun 2019-03-10 03:00:00 EDT
Share

Understanding Linux CPU Load

You might be familiar with Linux load averages already. Load averages are the three numbers shown with the uptime and top commands – they look like this:

load average: 0.09, 0.05, 0.01

Most people have an inkling of what the load averages mean: the three numbers represent averages over progressively longer periods of time (one, five, and fifteen minute averages), and that lower numbers are better. Higher numbers represent a problem or an overloaded machine. But, what's the the threshold? What constitutes "good" and "bad" load average values? When should you be concerned over a load average value, and when should you scramble to fix it ASAP?

First, a little background on what the load average values mean. We'll start out with the simplest case: a machine with one single-core processor.

The traffic analogy

A single-core CPU is like a single lane of traffic. Imagine you are a bridge operator … sometimes your bridge is so busy there are cars lined up to cross. You want to let folks know how traffic is moving on your bridge. A decent metric would be how many cars are waiting at a particular time. If no cars are waiting, incoming drivers know they can drive across right away. If cars are backed up, drivers know they're in for delays.

So, Bridge Operator, what numbering system are you going to use? How about:

Read more

Share

Create Customer Linux Distribution

Remastersys

We’ve previously covered Remastersys. It’s one of a group of tools that create your ISO files using the filesystem on which it’s being run. You essentially clone your current Debian/Ubuntu install and make it into a live CD. This makes it extremely easy to customize every little thing about your distro, because you’re actually running it and can changing settings normally as you go. Because of the flexibility of the program, it’s also more complex than some of the other options.

Linux Live Scripts

This is a set of shell scripts to convert your existing system into a live CD or USB image. It works similarly to Remastersys, but does not require you to be running Debian or Ubuntu. There is no GUI here, and your distribution may require you to manually install certain kernel modules for the scripts to run.
Live-Magic

This is a Debian/Ubuntu tool that can create CD, USB, and netboot images. It’s much simpler to use than Remastersys, but it does not use your running system to build the image. Instead, you follow a “wizard” and choose your configuration options as you go. The program will pull the packages from your repositories and install them into your image. Live-Magic can be installed via the normal package managers. Ubuntu users can click here.

Revisor

Revisor is a very nice remastering tool for Fedora. It gives a wide variety of media types and includes some customization features not found some of the other graphical tools, such as package-by-package selection or browsing by category. Revisor also allows you to choose whether your creation will be a live system or an installer.

Instalinux.com

The really interesting thing about Instalinux is that it allows you to create an ISO image online. At the website, you can choose which distribution to base it on as well as the packages. Instalinux will create a small bootable ISO (approx. 30mb) which, when booted, will begin the install and fetch the other packages from the Internet. This may be the most versatile tool on the list, and the web interface makes it extremely simple to use. It won’t, however, provide you with a full live desktop environment.

SUSE Studio

Somewhat similar to Instalinux, SUSE studio allows you to use a web interface to create a custom distribution or “appliance”. It tops the charts in supported media, by including output for CD, DVD, USB stick, hard drive, VMware, VirtualBox, and Xen. Unfortunately, SUSE Studio is an invite-only program. You can request an invitation from the website. Being backed by a large company, SUSE Studio is of course much more polished than Instalinux.

Src:
http://maketecheasier.com/6-tools-to-easily-create-your-own-custom-linux-distro/2010/04/08

Share

Linux Operating System

I've decided that I'd go through a thorough and various linux flavor in some idle pass time (when???). Anyway before forgetting just putting the list in my blog post-

  • AlphaCore Linux
  • Amazon Linux
  • APLINUX
  • Asianux
  • Asianux Server
  • BigBlock
  • BSDI
  • Caixa Magica
  • Caldera OpenLinux
  • Caldera OpenLinux eServer
  • cAos Linux
  • Cendio LBS Linux
  • CentOS Linux
  • Cobalt Linux
  • Coherent Technology Linux

    Read more

Share

Linux Distributions

A must read to learn and know the origins of different flavors of Linux distros.

You'l end up wondering 'why didn't I notice this before?…'  🙂

http://en.wikipedia.org/wiki/List_of_Linux_distributions

http://www.webmin.com/support.html

Share