This article explains top Linux commands.
Top File Commands for Linux Operating Systems
ls-Directory Listing
ls-al-Formatted Listing with Hidden Files.
ls-R-Path-Recursive Listing with all subdir
cd dir- change directory to dir
pwd- show current directory
mkdir dir- create a directory dir
rm file- delete file
rm-f file- force remove file
cp file1 file2- copy file1 to file2
touch file- create or update file
cat>file-place standard input into file
more file-output the contents of the file
head file-output the first 10 lines of the file
less file-like more, with extra features
cat file-view file, but it scrolls
File Permissions
chmod u+rw file -Give yourself read and write permission
chmod u+x file-Give yourself execute permission
chmod a+rw file-Give read and write permission to everyone.
Search Linux Commands
grep pattern files -search for pattern in files
grep -r pattern dir-search recursively for a pattern in dir command
grep pattern-search for a pattern in the output of the command
locate file -find all instances of file
SSH
ssh user@host-connect to host as the user.
ssh -p port user@host -connect to host on the port as a user.