Basic Linux commands you should know
Basic Linux commands you must know
ls | List the files of the given directory ls filename | ls -l ( list details like size, permissions,links etc.) ls /bin |
cd | change to directory cd path | cd /home/tom/cprograms cd .. (go to parent directoru) |
cp | copy a file cp source destination | cp a.txt b.txt cp a.txt /home/tom/cprograms |
rm | delete a file rm filename | rm a.txt rm * (delete all files in the current directory) |
pwd | print working directory (current) pwd | pwd |
mv | rename a file mv oldname newname | mv old.txt new.txt |
gcc | compile a c program using gcc compiler gcc cfilename | gcc program.c gcc -Wall pr2.c (Display all warnings) |
chmod | Change mode of a file - read/write/execute chmod mode filename | chmod +rwx file chmod -w a.c (Make the file readonly) chmod 0777 file2 (Make file2 read, write and executeable) |
man | Display manual page of given command or c function man command | man ls man chmod man printf |
Comments
Post a Comment