Saturday, February 6, 2016

Commonly Used Linux Commands

Linux Commands can be pretty tricky for first time users and advanced users.  That is why I am going to make a list of the commands I use the most.

Basic Navigation commands

pwd “Print Working Directory”  This command can show you the path to your exact location in the system.
EX:
pwd
/etc/sysconfig/networking

cd “Change Directory” This command is used to change your location in the system by adding the location path after it.
EX:
cd etc/sysconfig/networking/

.. can also be used with cd
EX:
cd ..

This will bring you up one level in the directory so if you were in /etc/sysconfig/networking cd .. would bring you up to /etc/sysconfig



ls will print out all the files inside of the folder or directory
EX:


















ls -la will print out all the files in the long format which includes information such as file size, ownership and permissions

  

File management commands

cp "copy" this command works just like any other computer it copies the file to a specified location.

How to use:
cp filename filelocation

EX:
cp net.conf /etc/sysconfig/networking/

mv "move" this command lets you move a file to a new location and it can also be used to rename a file.

How to use move:
mv filename filelocation

How to use rename:
mv filename newfilename currentlocation

rm "Remove a File" This command simply deletes any file specified

EX:
rm net.conf

mkdir "Make Directory" This command simply makes a directory/folder

EX:
mkdir myfiles


No comments:

Post a Comment