Wednesday 24 June 2015

Configuring ssh server in Ubuntu

To create a subshel as sh commands:
$sh filename

In Linux, success is represented by 0 and failure is represented by anything but 0.

$ps returns all the processes running on the system

%whoami tell the currently logged in user.

$echo $PATH
/usr/bin:/usr:/etc:/bin
The : is the separator between two paths.
The above command displays the addresses where an external cmmand might be. UNIX searches for the file in one of these locations and then runs it. Above is the default value for PATH. So change it according to your requirements.

PATH=.:/usr/bin:/usr:/etc:/bin
The . represents that user wants PATH to have the address of the present working directory as well.
This is the as setting the classpath for java class files.
Similarly we could use: PATH=$((.:+&PATH))

export PATH makes changes in PATH variable as global.

On starting a filename with a dot(.), that file will become hidden.
To see all hidden files along with others use: ls -a

Use variable holding paths of most frequently use folder.
x=/usr/a2/95 (export x to make this global)
Now simply do
cd $x and you're done.

No comments:

Post a Comment