Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Tuesday, September 3, 2013

Create Useful and handy commands with alias


Linux Alias
An alias is command line shortcuts. creating alias means that you will spend less time on typing the complex commands, you can create alias in linux that give meaningful names to obscure commands,

Thursday, August 22, 2013

List open ports and listening services

One of the first things you should do after a fresh operating system install is see what services are running and remove any unneeded services from the system startup process. You could use a port scanner and run it against the host, but if one didn’t come with the operating system install, you’ll 
likely have to connect your fresh (and possibly insecure) machine to the network to download one.



Sunday, July 14, 2013

Most Useful and handy Linux / Unix commands


pwd
It Prints the working directory, i.e., display the name of my current directory on the screen.

hostname
It Prints the name of the local host (the machine on which I am working). Use netconf (as root) to change the name of the machine.

whoami
Print my login name.

Monday, May 13, 2013

Secure Mount Points in Unix

The primary way of interacting with a Unix machine is through its filesystem.
Thus, when an intruder has gained access to a system, it is desirable to
limit what he can do with the files available to him. One way to accomplish
this is with the use of restrictive mount options.
A mount option is a flag that controls how the file system may be accessed. It
is passed to the operating system kernel’s code when the file system is
brought online. Mount options can be used to prevent files from being interpreted
as device nodes, to disallow binaries from being executed, and to disallow the
SUID bit from taking effect (by using the nodev, noexec, and nosuid
flags). Files ystems can also be mounted read-only with the ro option.
These options are specified from the command line by running mount with
the -o flag. For example, if you have a separate partition for /tmp that is on
the third partition of your first IDE hard disk, you can mount with the
nodev, noexec, and nosuid flags, which are enabled by running the following