In some strange situations it would be more helpful for us to find the previously executed command’s status(success or not). We can figure it out by using the following command; # echo $? Output: 0 : The ‘0’ represents, successfully…
commands
How/command to find out the current shell – Unix/Linux
Shell is a program that takes your commands from the keyboard and gives them to the operating system to perform. Some common types of shells are listed below: > /bin/bash > /bin/ksh > /bin/csh > /bin/sh > /sbin/nologin etc… How/command…
How to change/set the default runlevel – Unix/Linux
The runlevel is specified in the /etc/inittab file. Different runlevels and details are listed below: 0 – halt (Do NOT set initdefault to this) 1 – Single user mode 2 – Multiuser, without NFS (The same as 3, if you…
How to change the ownership of a file/directory – Unix/Linux
The owners of a file/dir under Linux are lisred below: 1, Owner 2, Group 3, Others You can change the ownership of a file/dir by using the ‘chown’ command. Syntax: # chown newowner file/dir Example: [root@localhost ~]# touch crybit [root@localhost…
How to change the group of a file/directory – Unix/Linux
The owners of a file/dir under Linux are listed below: 1, Owner 2, Group 3, Others You can change the group value of a file/dir by using the ‘chgrp’ command. Syntax: # chgrp newgroup file/dir Example: [root@localhost ~]# ll crybit…
How to create a banner/welcome-note for SSH server
We can create banner/welcome-note for SSH server simply by adding a text file in ‘/etc/ssh/’ location which contails the content as welcome-note. Do follow the steps below: Step 1: Create the text file which has your welcome note under ‘/etc/ssh/’…
How to manage SSH permission for custom users under your server
Sometimes it is very useful to manage/assign the SSH authentication to a particular user, Click here for SSH root permission. There are two directives in SSH configuration file to manage the SH permission for custom users, see the directive details…