Linux Commands


Commands 1st Argument 2nd Argument 3rd Argument working
ls Directory listing
ls -al Formatted listing with hidden files
ls -lt Sorting the Formatted listing by time modification
cd dir Change directory to dir
cd Change to home directory
pwd Show current working directory
mkdir dir Creating a directory dir
cat file Prints the content of file on terminal
touch file Create or update file
rm file Deleting the file
rm -r dir Deleting the directory
rm -f file Force to remove the file
rm -rf dir Force to remove the directory dir
cp file1 file2 Copy the contents of file1 to file2
cp -r dir1 dir2 Copy dir1 to dir2;create dir2 if not present
mv file1 file2 Rename or move file1 to file2,if file2 is an existing directory
ln -s file link Create symbolic link link to file
ps To display the currently working processes
top Display all running process
kill pid Kill the process with given pid
chmod octal file Change the permission of file to octal,which can be found separately for user,group,world by adding,
nano fileName Its simple test editor