As a beginner to Linux OS, one should have some basic knowledge about below linux commands to interact with files, directories and permissions
ls – list files and directories in current directory#list all files including hidden
ls -a
#list files with all the details
ls -l
#list files sorted by time with all details
ls -lt
pwd – display current working directory
mkdir – Create a directorymkdir <directory name>
rmdir – Remove specific directoryrmdir <directory name>
cd – change to directory# change or get inside specific directory
cd <directrory name>
# move one level up from current directory
cd ...
rm – removes files and directory. #remove one file
rm <filename>
# remove a folder and files in it. use -f command as well
rm -r <directory name>
cp – copy files from one directory to another directory or same with different namecp file1.txt filecopy.txt
cp /dir1/file1.txt /dir2/
mv – move a file from place to another or rename a filemv file1.txt filecopy.txt # renaming withing same directory
mv /dir1/file1.txt /dir2/file2.txt # moving from dir1 to dir2 and renaming
chmod – change permission of files and directory# changing file1.txt permission read write for owner and only read for others
chmod 644 file1.txt
chown – Change ownership of file or directory# change ownership of file
chown <username>:<groupname> file2.txt
sudo – “Super user do” run any command as super user (root). You should have sudo access# run a service using sudo
sudo service httpd start