Sunday, January 24, 2016

Linux basic commands

In this page we will try to explain some basic set of frequently used linux commands.

scp

In order to copy some file from one server to another server we use this command.
e.g.
To send file from current server to another remote server we use:
scp fileName user@hostname:/location/on/the/host/

To get file from remote server to current server we use on the current server:
scp<space>user@hostname:/location/on/the/remote/server/fileName<space>[path/on/this/server]

1. The above commands will ask for the credentials.
2. We can use the IP address of the server
3. To get hostname, we need to use "hostname" command on the remote host.

showmount

To check mount points, we should use below commands.
showmount -e

How should I create a filesytem on Linux?

To create file system using fdisk follow the below steps:
  1. fdisk /dev/sdc <=== Change your corresponding device
  2. mkfs.ext3 /dev/sdc. Say sdc1 partition gets created here.
  3. create mount point /tmp/mountpt
  4. mount -t ext3 /dev/sdc1 /tmp/mountpt
  5. df -h <== To check your file system mounted properly.

No comments:

Post a Comment