Skip to main content

Basic in Linux

Linux is one of the operation system. We can tell it as UNIX like operating system. It is open source, It come under GNU public license. We can use it as free. For more and updated details about Linux try Wikipedia.

Now we'll go for learning Linux throw command line, Before go administration these are some basics,

Terminal

The terminal is using for executing commends in Linux box. If we open terminal, it looks as bellow

[kumar@LocalHost ~]$

Here "kumar" is user account in Linux box. "LocalHost" is host name of your system, that means your system name. Normally till (~) symbol mention home directory of the logged user. If you are as root user , it looks as bellow

[root@LocalHost ~]#

Here you can see a difference in both things, that is dollar ($) symbol and Hash (#). There normal user have $ symbol at end and root user have # symbol at the end. This is easily to identify which user we have logged.

Executable commends in Linux are stored in /bin and /sbin directories. The normal user are can access only commends under /bin , They can's use /sbin commends. But the root user can access both /bin and /sbin directory commends.

root is the administrator account. If we made and mistakes while in root account, there is chance to crash hole system.

man:

man is a very basic command in Linux box. We normal know it as man pages. The man pages are manual of commands. most of the commands in Linux have man pages. It describe all about commands. The syntax of the man page is "man {command}"

ex:
[kumar@LocalHost ~]$man ls 

ls:

ls is the basic command in Linux box, ls is used to list files.
ex: 
[kumar@LocalHost ~]$ ls
[kumar@LocalHost ~]$

Here we didn't create any files, so it didn't give any output.

cat:

cat command is used to show the file. And also this is used to create and append the file.

cat {FileName} - Open file
cat > {FileName} - Create file
cat >> {FileName} - Append file
ex:
[kumar@LocalHost ~]$ cat > filename
hi this is my first file

[kumar@LocalHost ~]$ cat filename
hi this is my first file
[kumar@LocalHost ~]$ cat >> filename
this is additional lines

[kumar@LocalHost ~]$ cat filename
hi this is my first file
this is additional lines
[kumar@LocalHost ~]$

"ctrl + c" used to quit file, It'll save and exit from cat.

We can't edit already created file with "cat" command. For this we are going for other editors available in Linux.
ex: vi, vim etc.,

Before we going to editors we'll see the "ls" command, As seen before ls is the command used for list file in Linux,

[kumar@LocalHost ~]$ ls
filename
[kumar@LocalHost ~]$

This is the file we created as before by "cat".
ex:

[kumar@LocalHost ~]$ ls -l
total 4
-rw-rw-r-- 1 kumar kumar 50 Aug  3 11:47 filename

Here -l is the option for ls command, It give some detailed information about the file or directory.

"total 4" is blocks used by the file "filename".

"-rw-rw-r--" is about file permission, we'll see about it later.
"1" is about file count.
"kumar" is owner of file
"kumar" is group under this file
"50"  file size
"Aug 3 11.47" file creation date and time
"filename" name of the file

for more option try man pages and try more,

mkdir:

mkdir is the command used to create folder in Linux box.
ex:
[kumar@LocalHost ~] mkdir myfolder

rm:

rm is the command used to remove folder or file.
ex:
rm {filename}

options:
-f used to force the deletion, it won't ask conformation
-r used for recursive deletion, i meant it used to delete entire folder

[kumar@LocalHost ~] rm -f filename
[kumar@LocalHost ~] rm -fr myfolder

vim:
vim is the editor, It is advance version of the vi editor. vim editor can be used to create, edit and update file.

ex:
[kumar@LocalHost ~] vim newfile

It'll open editor window, Normally it in uneditable mode. By press "i" key we can move to edit mode, to quit from edit mode, press "esc" key.
After finish typing, press "esc" key and type ":wq" for save and quit. Here w for save and q for quid vim. We can use this command separately. For quit without changes, ":q!".

For more options try man pages.

Comments

Popular posts from this blog

Install and Uninstall VMware .bundle in Redhat - RHEL 6

Here the steps for Install and Uninstall VMware .bundle in Redhat and also Linux. I have checked with RHEL 6.

For install :
Login in as root user, Type following command

~]# sh VMware-***.bundle

Here *** will be your software and it's version.

This command will display normal GUI installation. Choose option as your wish.

For Uninstall :
Login in as root user, Type following command


~]# vmware-installer -l

This will display your product name and product version installed by VMware.

Ex:
*
*
*
Product Name         Product Version    
========== ==============
vmware-player        4.0.1.528992   

Note Name and Version, Use following command to uninstall

~]# vmware-installer -u {product-name} {product-version}

Ex:
~]# vmware-installer -u vmware-workstation 8.0.1.528992

Now you can uninstall with GUI.

* This is common for all VMware .bundle installation files. Ex: VMware-Workstation, VMware-Player etc.

Play NFS (Need For Speed) or other Games on Full Screen in Laptop with Windows 7

Now a days most of people playing NFS serious (NFS Most Wanted , NFS Carbon etc.) in Laptop.

We are facing the problem that NFS game does not play in full screen mode. It have some black bar at both right and left side.

We can fix it with simple steps, For this your video driver should be installed with it's "Graphics & Media Control Panel" application.

Here i have explained it with screen shot. It'll be mostly same for Intel boards. Settings for other video drivers may differ. You may need to search for it in their graphics control panel.


Step 1 :

Click aero button at right bottom corner for show available notifications and running process. There is Graphics & Media Control Panel Icon.
If it is not avaliable there, you can get it from "Windows Control Panel". It'll open your "Graphics & Media Control Panel".


Step 2 :

Click Graphics & Media Control Panel icon and choose Graphics Properties...


Step 3:

Under Intel Graphics and …