Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Saturday

Linux VS Windows


Most of us are still using windows operating system like some people uses windows XP,7 or vista. As you are interested in the field of IT security(hacking), so you should have heard about linux and its features, in this article we will discuss about linux vs windows.






Windows
Microsoft windows is not free, windows can run between $50-$150.
Microsoft windows is user friendly and ease to use, several GUI, or "Skid" programs.
Microsoft windows has made several improvement on reliability.
If we are talking about security on windows than Microsoft has made great improvement but still their operating system most vulnerable to viruses and other attacks.
Microsoft windows is not open source.

Linux
Linux is an open source project. As they say, it is free.
Linux is ease to use but if you are a new computer user(s) than windows is good to start.
Majority of the Linux are more reliable than windows, you can run for the months and year without rebooting.
Linux is a very secure operating system, viruses,spyware and adware does not affect a linux based operating system.
If you want to learn programming, Linux is the best for you. Linux distributions come with many compilers and other tools to write and execute code.

Its just a comparison now you have to decide about your operating system.
You can run Linux along with Windows on a different partition. You can boot to Windows wherever you want. It is also possible to run Linux in Windows using emulator software like VMWare or MS Virtual PC. Likewise, it is also possible to run Windows applications in Linux using emulators like Wine (This Wine is different!).

Wednesday

How to install FireSheep on Linux

What is FireSheep ?

Come on damn.. Its not new! :-D Its an old firefox addon. I am explaining it here for how can you use or install it on Linux.

Lets start ;

Taking Checkout from the repository :

git clone https://github.com/codebutler/firesheep.git

Output :

Initialized empty Git repository in /root/firesheep/.git/
remote: Counting objects: 1020, done.
remote: Compressing objects: 100% (605/605), done.
remote: Total 1020 (delta 589), reused 770 (delta 402)
Receiving objects: 100% (1020/1020), 5.48 MiB | 123 KiB/s, done.
Resolving deltas: 100% (589/589), done.

cd firesheep/
git submodule update --init

Output :

Output :Submodule ‘backend/deps/http-parser’ (git://github.com/ry/http-parser.git) registered for path ‘backend/deps/http-parser’
Initialized empty Git repository in /root/firesheep/backend/deps/http-parser/.git/
remote: Counting objects: 815, done.
remote: Compressing objects: 100% (328/328), done.
remote: Total 815 (delta 549), reused 735 (delta 483)
Receiving objects: 100% (815/815), 185.18 KiB | 95 KiB/s, done.
Resolving deltas: 100% (549/549), done.
Submodule path ‘backend/deps/http-parser’: checked out ’459507f534c807d8ba741730fbc36d4b93b133c1′

Dependencies :

apt-get install libpcap-dev xulrunner-1.9.2-dev libboost-all-dev libtool libhal-dev autoconf

Compilation :

./autogen.sh
make

DONE!

How to Load it into Firefox?

firefox build/firesheep.xpi

Monday

LINUX COMMANDS

i have posted linux command for you so dnt forget to say thanks

a2p Creates a Perl script from an awk script.
ac Prints statistics about users' connect time.
alias Create a name for another command or long command string.
ar Maintain portable archive or library.
arch Display the architecture of the current host.
arp Manipulate the system ARP cache.
as An assembler.
at Command scheduler.
awk Awk script processing program.
basename Deletes any specified prefix from a string.
bash Command Bourne interpreter
bc Calculator.
bdiff Compare large files.
bfs Editor for large files.
bg Continues a program running in the background.
biff Enable / disable incoming mail notifications.
break Break out of while, for, foreach, or until loop.
bs Battleship game.
bye Alias often used for the exit command.
cal Calendar
calendar Display appointments and reminders.
cancel Cancels a print job.
cat View or modify a file.
cc C compiler.
cd Change directory.
chdir Change directory.
checkeq Language processors to assist in describing equations.
checknr Check nroff and troff files for any errors.
chfn Modify your own information or if super user or root modify another users information.
chgrp Change a groups access to a file or directory.
chkey Change the secure RPC key pair.
chmod Change the permission of a file.
chown Change the ownership of a file.
chsh Change login shell.
cksum Display and calculate a CRC for files.
clear Clears screen.
cls Alias often used to clear a screen.
cmp Compare files.
col Reverse line-feeds filter.
comm Compare files and select or reject lines that are common.
compress Compress files on a computer.
continue Break out of while, for, foreach, or until loop.
copy Copy files.
cp Copy files.
cpio Creates archived CPIO files.
crontab Create and list files that you wish to run on a regular schedule.
csh Execute the C shell command interpreter
csplit Split files based on context.
ctags Create a tag file for use with ex and vi.
cu Calls or connects to another Unix system, terminal or non-Unix system.
curl Transfer a URL.
cut Cut out selected fields of each line of a file.
date Tells you the date and time in Unix.
dc An arbitrary precision arithmetic package.
df Display the available disk space for each mount.
deroff Removes nroff/troff, tbl, and eqn constructs.
dhclient Dynamic Host Configuration Protocol Client.
diff Displays two files and prints the lines that are different.
dig DNS lookup utility.
dircmp Lists the different files when comparing directories.
dirname Deliver portions of path names.
dmesg Print or control the kernel ring buffer.
dos2unix Converts text files between DOS and Unix formats.
dpost Translates files created by troff into PostScript.
du Tells you how much space a file occupies.
echo Displays text after echo to the terminal.
ed Line oriented file editor.
edit Text editor.
egrep Search a file for a pattern using full regular expressions.
elm Program command used to send and receive e-mail.
emacs Text editor.
enable Enables / Disables LP printers.
env Displays environment variables.
eqn Language processors to assist in describing equations.
ex Line-editor mode of the vi text editor.
exit Exit from a program, shell or log you out of a Unix network.
expand Expand copies of file s.
expr Evaluate arguments as an expression.
fc The FC utility lists or edits and re-executes, commands previously entered to an interactive sh.
fg Continues a stopped job by running it in the foreground
fgrep Search a file for a fixed-character string.
file Tells you if the object you are looking at is a file or if it is a directory.
find Finds one or more files assuming that you know their approximate filenames.
findsmb List info about machines that respond to SMB name queries on a subnet.
finger Lists information about the user.
fmt Simple text formatters.
fold Filter for folding lines.
for

Shell built-in functions to repeatedly execute action(s) for a selected number of times.
foreach Shell built-in functions to repeatedly execute action(s) for a selected number of times.
fromdos Converts text files between DOS and Unix formats.
fsck Check and repair a Linux file system.
ftp Enables ftp access to another terminal.
getfacl Display discretionary file information.
gprof The gprof utility produces an execution profile of a program.
grep Finds text within a file.
groupadd Creates a new group account.
groupdel Enables a super user or root to remove a group.
groupmod Enables a super user or root to modify a group.
gunzip Expand compressed files.
gview A programmers text editor.
gvim A programmers text editor.
gzip Compress files.
halt Stop the computer.
hash Remove internal hash table.
hashstat Display the hash stats.
head Displays the first ten lines of a file, unless otherwise stated.
help If computer has online help documentation installed this command will display it.
history Display the history of commands typed.
host DNS lookup utility.
hostid Prints the numeric identifier for the current host.
hostname Set or print name of current host system.
id Shows you the numeric user and group ID on BSD.
ifconfig Sets up network interfaces.
ifdown take a network interface down
ifup bring a network interface up
isalist Display the native instruction sets executable on this platform.
jobs List the jobs currently running in the background.
join Joins command forms together.
keylogin Decrypt the user's secret key.
kill Cancels a job.
ksh Korn shell command interpreter.
ld Link-editor for object files.
ldd List dynamic dependencies of executable files or shared objects.
less Opposite of the more command.
lex Generate programs for lexical tasks.
link Calls the link function to create a link to a file.
ln Creates a link to a file.
lo Allows you to exit from a program, shell or log you out of a Unix network.
locate List files in databases that match a pattern.
login Signs into a new system.
logname Returns users login name.
logout Logs out of a system.
lp Prints a file on System V systems.
lpadmin Configure the LP print service.
lpc Line printer control program.
lpq Lists the status of all the available printers.
lpr Submits print requests.
lprm Removes print requests from the print queue.
lpstat Lists status of the LP print services.
ls Lists the contents of a directory.
mach Display the processor of the current host.
mail One of the ways that allows you to read/send E-Mail.
mailcompat Provide SunOS 4.x compatibility for the Solaris mailbox format.
mailx Mail interactive message processing system.
make Executes a list of shell commands associated with each target.
man Display a manual of a command.
mesg Control if non-root users can send text messages to you.
mii-tool View, manipulate media-independent interface status.
mkdir Create a directory.
mkfs Build a Linux file system, usually a hard disk partition.
more Displays text one screen at a time.
mount Disconnects a file systems and remote resources.
mt Magnetic tape control.
mv Renames a file or moves it from one directory to another directory.
nc TCP/IP swiss army knife.
neqn Language processors to assist in describing equations.
netstat Shows network status.
newalias Install new elm aliases for user or system.
newform Change the format of a text file.
newgrp Log into a new group.
nice Invokes a command with an altered scheduling priority.
niscat Display NIS+ tables and objects.
nischmod Change access rights on a NIS+ object.
nischown Change the owner of a NIS+ object.
nischttl Change the time to live value of a NIS+ object.
nisdefaults Display NIS+ default values.
nisgrep Utilities for searching NIS+ tables.
nismatch Utilities for searching NIS+ tables.
nispasswd Change NIS+ password information.
nistbladm NIS+ table administration command.
nmap Network exploration tool and security / port scanner.
nohup Runs a command even if the session is disconnected or the user logs out.
nroff Formats documents for display or line-printer.
nslookup Queries a name server for a host or domain lookup.
on Execute a command on a remote system, but with the local environment.
onintr Shell built-in functions to respond to (hardware) signals.
optisa Determine which variant instruction set is optimal to use.
pack Shrinks file into a compressed file.
pagesize Display the size of a page of memory in bytes, as returned by getpagesize.
passwd Allows you to change your password.
paste Merge corresponding or subsequent lines of files.
pax Read / write and writes lists of the members of archive files and copy directory hierarchies.
pcat Compresses file.
perl Perl is a programming language optimized for scanning arbitrary text files, extracting information from those text files.
pg Files perusal filters for CRTs.
pgrep Examine the active processes on the system and reports the process IDs of the processes
pico Simple and very easy to use text editor in the style of the Pine Composer.
pine Command line program for Internet News and Email.
ping Sends ICMP ECHO_REQUEST packets to network hosts.
pkill Examine the active processes on the system and reports the process IDs of the processes
poweroff Stop the computer.
pr Formats a file to make it look better when printed.
priocntl Display's or set scheduling parameters of specified process(es)
printf Write formatted output.
ps Reports the process status.
pvs Display the internal version information of dynamic objects within an ELF file.
pwd Print the current working directory.
quit Allows you to exit from a program, shell or log you out of a Unix network.
rcp Copies files from one computer to another computer.
reboot Stop the computer.
red Line oriented file editor.
rehash Recomputes the internal hash table of the contents of directories listed in the path.
remsh Runs a command on another computer.
repeat Shell built-in functions to repeatedly execute action(s) for a selected number of times.
rgview A programmers text editor.
rgvim A programmers text editor.
rlogin Establish a remote connection from your terminal to a remote machine.
rm Deletes a file without confirmation (by default).
rmail One of the ways that allows you to read/send E-Mail.
rmdir Deletes a directory.
rn Reads newsgroups.
route Show / manipulate the IP routing table.
rpcinfo Report RPC information.
rsh Runs a command on another computer.
rsync Faster, flexible replacement for rcp.
rview A programmers text editor.
rvim A programmers text editor.
s2p Convert a sed script into a Perl script.
sag Graphically displays the system activity data stored in a binary data file by a previous sar run.
sar Displays the activity for the CPU.
script Records everything printed on your screen.
sdiff Compares two files, side-by-side.
sed Allows you to use pre-recorded commands to make changes to text.
sendmail Sends mail over the Internet.
set Set the value of an environment variable.
setenv Set the value of an environment variable.
setfacl Modify the Access Control List (ACL) for a file or files.
settime Change file access and modification time.
sftp Secure file transfer program.
sh Runs or processes jobs through the Bourne shell.
shred Delete a file securely, first overwriting it to hide its contents.
shutdown Turn off the computer immediately or at a specified time.
sleep Waits a x amount of seconds.
slogin OpenSSH SSH client (remote login program).
smbclient An ftp-like client to access SMB/CIFS resources on servers.
sort Sorts the lines in a text file.
spell Looks through a text file and reports any words that it finds in the text file that are not in the dictionary.
split Split a file into pieces.
stat Display file or filesystem status.
stop Control process execution.
strip Discard symbols from object files.
stty Sets options for your terminal.
su Become super user or another user.
sysinfo Get and set system information strings.
sysklogd Linux system logging utilities.
tabs Set tabs on a terminal.
tail Delivers the last part of the file.
talk Talk with other logged in users.
tac Concatenate and print files in reverse.
tar Create tape archives and add or extract files.
tbl Preprocessor for formatting tables for nroff or troff.
tcopy Copy a magnetic tape.
tcpdump Dump traffic on a network.
tee Read from an input and write to a standard output or file.
telnet Uses the telnet protocol to connect to another remote computer.
time Used to time a simple command.
timex The timex command times a command; reports process data and system activity.
todos Converts text files between DOS and Unix formats.
top Display Linux tasks.
touch Change file access and modification time.
tput Initialize a terminal or query terminfo database.
tr Translate characters.
traceroute Print the route packets take to network host.
troff Typeset or format documents.
ul Reads the named filenames or terminal and does underlining.
umask Get or set the file mode creation mask.
unalias Remove an alias.
unhash Remove internal hash table.
uname Print name of current system.
uncompress Uncompressed compressed files.
uniq Report or filter out repeated lines in a file.
unmount Crates a file systems and remote resources.
unpack Expands a compressed file.
untar Create tape archives and add or extract files.
until Execute a set of actions while/until conditions are evaluated TRUE.
useradd Create a new user or updates default new user information.
userdel Remove a users account.
usermod Modify a users account.
vacation Reply to mail automatically.
vedit Screen-oriented (visual) display editor based on ex.
vgrind Grind nice program listings
vi Screen-oriented (visual) display editor based on ex.
vim A programmers text editor.
view A programmers text editor.
w Show who is logged on and what they are doing.
wait Await process completion.
wc Displays a count of lines, words, and characters in a file
whereis Locate a binary, source, and manual page files for a command.
while Repetitively execute a set of actions while/until conditions are evaluated TRUE.
which Locate a command.
who Displays who is on the system.
whois Internet user name directory service.
write Send a message to another user.
X Execute the X windows system.
xfd Display all the characters in an X font.
xlsfonts Server font list displayer for X.
xset User preference utility for X.
xterm Terminal emulator for X.
xrdb X server resource database utility.
yacc Short for yet another compiler-compiler, yacc is a compiler.
yes Repeatedly output a line with all specified STRING(s), or 'y'.
yppasswd Changes network password in the NIS database.
zcat Compress files

Sunday

How Linux boots

As it turns out, there isn't much to the boot process:
1. A boot loader finds the kernel image on the disk, loads it into memory, and starts it.
2. The kernel initializes the devices and its drivers.
3. The kernel mounts the root filesystem.
4. The kernel starts a program called init.
5. init sets the rest of the processes in motion.
6. The last processes that init starts as part of the boot sequence allow you to log in.
Identifying each stage of the boot process is invaluable in fixing boot problems and understanding the system as a whole. To start, zero in on the boot loader, which is the initial screen or prompt you get after the computer does its power-on self-test, asking which operating system to run. After you make a choice, the boot loader runs the Linux kernel, handing control of the system to the kernel.
There is a detailed discussion of the kernel elsewhere in this book from which this article is excerpted. This article covers the kernel initialization stage, the stage when the kernel prints a bunch of messages about the hardware present on the system. The kernel starts init just after it displays a message proclaiming that the kernel has mounted the root filesystem:
VFS: Mounted root (ext2 filesystem) readonly.
Soon after, you will see a message about init starting, followed by system service startup messages, and finally you get a login prompt of some sort.
NOTE On Red Hat Linux, the init note is especially obvious, because it "welcomes" you to "Red Hat Linux." All messages thereafter show success or failure in brackets at the right-hand side of the screen.
Most of this chapter deals with init, because it is the part of the boot sequence where you have the most control.
init
There is nothing special about init. It is a program just like any other on the Linux system, and you'll find it in /sbin along with other system binaries. The main purpose of init is to start and stop other programs in a particular sequence. All you have to know is how this sequence works.
There are a few different variations, but most Linux distributions use the System V style discussed here. Some distributions use a simpler version that resembles the BSD init, but you are unlikely to encounter this.
Runlevels
At any given time on a Linux system, a certain base set of processes is running. This state of the machine is called its runlevel, and it is denoted with a number from 0 through 6. The system spends most of its time in a single runlevel. However, when you shut the machine down, init switches to a different runlevel in order to terminate the system services in an orderly fashion and to tell the kernel to stop. Yet another runlevel is for single-user mode, discussed later.
The easiest way to get a handle on runlevels is to examine the init configuration file, /etc/inittab. Look for a line like the following:
id:5:initdefault:
This line means that the default runlevel on the system is 5. All lines in the inittab file take this form, with four fields separated by colons occurring in the following order:
# A unique identifier (a short string, such as id in the preceding example)
# The applicable runlevel number(s)
# The action that init should take (in the preceding example, the action is to set the default runlevel to 5)
# A command to execute (optional)
There is no command to execute in the preceding initdefault example because a command doesn't make sense in the context of setting the default runlevel. Look a little further down in inittab, until you see a line like this:
l5:5:wait:/etc/rc.d/rc 5
This line triggers most of the system configuration and services through the rc*.d and init.d directories. You can see that init is set to execute a command called /etc/rc.d/rc 5 when in runlevel 5. The wait action tells when and how init runs the command: run rc 5 once when entering runlevel 5, and then wait for this command to finish before doing anything else.
There are several different actions in addition to initdefault and wait, especially pertaining to power management, and the inittab(5) manual page tells you all about them. The ones that you're most likely to encounter are explained in the following sections.
respawn
The respawn action causes init to run the command that follows, and if the command finishes executing, to run it again. You're likely to see something similar to this line in your inittab file:
1:2345:respawn:/sbin/mingetty tty1
The getty programs provide login prompts. The preceding line is for the first virtual console (/dev/tty1), the one you see when you press ALT-F1 or CONTROL-ALT-F1. The respawn action brings the login prompt back after you log out.
ctrlaltdel
The ctrlaltdel action controls what the system does when you press CONTROL-ALT-DELETE on a virtual console. On most systems, this is some sort of reboot command using the shutdown command.
sysinit
The sysinit action is the very first thing that init should run when it starts up, before entering any runlevels.
How processes in runlevels start
You are now ready to learn how init starts the system services, just before it lets you log in. Recall this inittab line from earlier:
l5:5:wait:/etc/rc.d/rc 5
This small line triggers many other programs. rc stands for run commands, and you will hear people refer to the commands as scripts, programs, or services. So, where are these commands, anyway?
For runlevel 5, in this example, the commands are probably either in /etc/rc.d/rc5.d or /etc/rc5.d. Runlevel 1 uses rc1.d, runlevel 2 uses rc2.d, and so on. You might find the following items in the rc5.d directory:
S10sysklogd S20ppp S99gpm
S12kerneld S25netstd_nfs S99httpd
S15netstd_init S30netstd_misc S99rmnologin
S18netbase S45pcmcia S99sshd
S20acct S89atd
S20logoutd S89cron
The rc 5 command starts programs in this runlevel directory by running the following commands:
S10sysklogd start
S12kerneld start
S15netstd_init start
S18netbase start
...
S99sshd start
Notice the start argument in each command. The S in a command name means that the command should run in start mode, and the number (00 through 99) determines where in the sequence rc starts the command.
The rc*.d commands are usually shell scripts that start programs in /sbin or /usr/sbin. Normally, you can figure out what one of the commands actually does by looking at the script with less or another pager program.
You can start one of these services by hand. For example, if you want to start the httpd Web server program manually, run S99httpd start. Similarly, if you ever need to kill one of the services when the machine is on, you can run the command in the rc*.d directory with the stop argument (S99httpd stop, for instance).
Some rc*.d directories contain commands that start with K (for "kill," or stop mode). In this case, rc runs the command with the stop argument instead of start. You are most likely to encounter K commands in runlevels that shut the system down.
Adding and removing services
If you want to add, delete, or modify services in the rc*.d directories, you need to take a closer look at the files inside. A long listing reveals a structure like this:
lrwxrwxrwx . . . S10sysklogd -> ../init.d/sysklogd
lrwxrwxrwx . . . S12kerneld -> ../init.d/kerneld
lrwxrwxrwx . . . S15netstd_init -> ../init.d/netstd_init
lrwxrwxrwx . . . S18netbase -> ../init.d/netbase
...
The commands in an rc*.d directory are actually symbolic links to files in an init.d directory, usually in /etc or /etc/rc.d. Linux distributions contain these links so that they can use the same startup scripts for all runlevels. This convention is by no means a requirement, but it often makes organization a little easier.
To prevent one of the commands in the init.d directory from running in a particular runlevel, you might think of removing the symbolic link in the appropriate rc*.d directory. This does work, but if you make a mistake and ever need to put the link back in place, you might have trouble remembering the exact name of the link. Therefore, you shouldn't remove links in the rc*.d directories, but rather, add an underscore (_) to the beginning of the link name like this:
mv S99httpd _S99httpd
At boot time, rc ignores _S99httpd because it doesn't start with S or K. Furthermore, the original name is still obvious, and you have quick access to the command if you're in a pinch and need to start it by hand.
To add a service, you must create a script like the others in the init.d directory and then make a symbolic link in the correct rc*.d directory. The easiest way to write a script is to examine the scripts already in init.d, make a copy of one that you understand, and modify the copy.
When adding a service, make sure that you choose an appropriate place in the boot sequence to start the service. If the service starts too soon, it may not work, due to a dependency on some other service. For non-essential services, most systems administrators prefer numbers in the 90s, after most of the services that came with the system.
Linux distributions usually come with a command to enable and disable services in the rc*.d directories. For example, in Debian, the command is update-rc.d, and in Red Hat Linux, the command is chkconfig. Graphical user interfaces are also available. Using these programs helps keep the startup directories consistent and helps with upgrades.
HINT: One of the most common Linux installation problems is an improperly configured XFree86 server that flicks on and off, making the system unusable on console. To stop this behavior, boot into single-user mode and alter your runlevel or runlevel services. Look for something containing xdm, gdm, or kdm in your rc*.d directories, or your /etc/inittab.
Controlling init
Occasionally, you need to give init a little kick to tell it to switch runlevels, to re-read the inittab file, or just to shut down the system. Because init is always the first process on a system, its process ID is always 1.
You can control init with telinit. For example, if you want to switch to runlevel 3, use this command:
telinit 3
When switching runlevels, init tries to kill off any processes that aren't in the inittab file for the new runlevel. Therefore, you should be careful about changing runlevels.
When you need to add or remove respawning jobs or make any other change to the inittab file, you must tell init about the change and cause it to re-read the file. Some people use kill -HUP 1 to tell init to do this. This traditional method works on most versions of Unix, as long as you type it correctly. However, you can also run this telinit command:
telinit q
You can also use telinit s to switch to single-user mode.
Shutting down
init also controls how the system shuts down and reboots. The proper way to shut down a Linux machine is to use the shutdown command.
There are two basic ways to use shutdown. If you halt the system, it shuts the machine down and keeps it down. To make the machine halt immediately, use this command:
shutdown -h now
On most modern machines with reasonably recent versions of Linux, a halt cuts the power to the machine. You can also reboot the machine. For a reboot, use -r instead of -h.
The shutdown process takes several seconds. You should never reset or power off a machine during this stage.
In the preceding example, now is the time to shut down. This argument is mandatory, but there are many ways of specifying it. If you want the machine to go down sometime in the future, one way is to use +n, where n is the number of minutes shutdown should wait before doing its work. For other options, look at the shutdown(8) manual page.
To make the system reboot in 10 minutes, run this command:
shutdown -r +10
On Linux, shutdown notifies anyone logged on that the machine is going down, but it does little real work. If you specify a time other than now, shutdown creates a file called /etc/nologin. When this file is present, the system prohibits logins by anyone except the superuser.
When system shutdown time finally arrives, shutdown tells init to switch to runlevel 0 for a halt and runlevel 6 for a reboot. When init enters runlevel 0 or 6, all of the following takes place, which you can verify by looking at the scripts inside rc0.d and rc6.d:
1. init kills every process that it can (as it would when switching to any other runlevel).
# The initial rc0.d/rc6.d commands run, locking system files into place and making other preparations for shutdown.
# The next rc0.d/rc6.d commands unmount all filesystems other than the root.
# Further rc0.d/rc6.d commands remount the root filesystem read-only.
# Still more rc0.d/rc6.d commands write all buffered data out to the filesystem with the sync program.
# The final rc0.d/rc6.d commands tell the kernel to reboot or stop with the reboot, halt, or poweroff program.
The reboot and halt programs behave differently for each runlevel, potentially causing confusion. By default, these programs call shutdown with the -r or -h options, but if the system is already at the halt or reboot runlevel, the programs tell the kernel to shut itself off immediately. If you really want to shut your machine down in a hurry (disregarding any possible damage from a disorderly shutdown), use the -f option.
Related Posts Plugin for WordPress, Blogger...