Linux Basic Commands for Beginners

basic linux commands, linux basic commands, basic linux commands for beginners, basic linux commands with example, basic linux commands tutorials, basic linux commands list, basic linux commands ppts, basic linux commands for fresher with examples, Important Linux Commands, Common Linux Commands, linux basic commands pdf, linux basic commands for beginners, linux basic commands with examples, linux basic commands tutorials,

Linux Basic Commands for Beginners
We should be more familiar with some basic commands  to access the files and Folders (Directories) in terminal mode.

Linux Basic Commands for Beginners

Changing from one folder to different folders:
"cd" command helps to go from one directory to other directory.
cd /myfolder - Go to the myfolder directory under "/" directory from current directory.
cd ..        - Moves up one directory (include the two little dots)
cd           - Go to the parent direcory.
cd ~         - Go to the parent direcory.
cd -         - Go to the previous folder where we before.

Find the current directory where you are in:
"pwd" command Shows the current directory (folder) you are in. In Linux, by default you will get into your home directory once you logged in.
If you are in your home directory (where terminals start) and type pwd, you will see /home/user1. Now go to other directory (cd /tmp/test) and  type the command "pwd" to see the current directory. You will see the output as "/tmp/test"

Making or Creating a Directory (terminal mode)
mkdir dirName     - Creates a directory with name dirName.
For Example:
mkdir temp

Deleting or Removing a Directory (terminal mode)
rmdir dirName      Removes a directory dirName.
For Example:
rmdir temp

Deleting or Removing a File (terminal mode)
rm fileName      Removes a files.
For Example:
rm data1                      Deletes the file data1 in the current directory.
rm -i data*                Removes all of your files which matches the filename data as the first four letters. (careful!!  rm * will remove ALL your files). The "-i" makes the computer prompt before removing each file.

Moving the files or folders
mv data1 /path/data1  -  moves the file or folder data1 to the folder /path/ and deletes the old one.

Renaming the files or folders
mv data1 /path/data2  -  moves the file or folder data1 to the folder /path/ as name "data2" and deletes the old one.

Copying the files or folders
cp data1 newdata/    will copy the data1 to the new directory newdata.

Listing the Files and Folders
ls     - Lists files.
If you add -al options after "ls" command, it will give more details for each file. Such as, size, permissions, owners, dates etc.
ls -al    - You'll see a huge list of files that you can't see with the 'ls' command alone and lots of details.
If you see such a long list of files that they scroll off the terminal screen, one way to solve the problem is to use:
ls -al |more    - Shows one screen of file names at a time.

Creating or making new files
Use some below text editors to create or make a new files.
  • vi
  • vim
  • cat
  • touch
  • nano
  • emacs
Accessing or Mounting the CDROM or DVD media
CDROM and DVD media's wont available in linux automatically until you tell it to.
Mount the DVDROM or CDROM to some directory to access the contents of it.
mount source destination
Example : mount /dev/cdrom /media
Where "/dev/cdrom" is a source driver for both cdrom or dvdrom and /media is a destination folder where all datas of cdrom or dvdrom will be available under /media.

Ejecting or Unmounting the CDROM or DVD Media
Unmount the DVDROM or CDROM from the directory where we mounted already.
umount source
umount destination
Example : umount /dev/cdrom or umount /media
If you would like to see the avaiable commands in linux, please check inside the directories like /bin, /sbin, /usr/bin, /usr/sbin

We appreciate your feedback, Leave your comments if any.
To not miss any updates, follow us on social networking sites and Subscribe us on YouTube channel for video tutorials.

November 26, 2015

Post a comment


Contact Form


Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget