LINUX Assignment

·

3 min read

1] Tomcat installation


2] Change the default Tomcat port to 9050


3] Create a new user and configure the necessary settings for secure login via Putty or other remote access tools


4] Configure Gmail on your Linux machine using Postfix/ Sendmail to enable sending emails from your Gmail Account through the command line


5] Establish passwordless connection between two linux servers


6] Create a new user account on your Linux machine and grant them sudo privileges


7] Use the 'scp' command to securely copy files and directories between Linux machines without password


8] Command that searches for files in the current and subsequent directories with a ".c" extension and the occurrence of the string "linux" within them.

find -type f maxdepth 1 -name "*.c" | grep -lR "linux"

9] How can you list the contents of a tar.gz file and extract a particular file

List Contents:

tar -ztvf <file>e.tar.gz

Extract a Particular File:

tar -xzf <file>.tar.gz <path>

10] How can you compress a directory or file into a tar archive on Linux

 tar -cvzf <name>tar.gz

11] Write a command to synchronize files and directories between 2 local folders

rsync -options source_directory/ destination_directory/

12] What is load average and swap memory in Linux

  • Linux load average is a metric that shows the number of tasks currently executed by the CPU and tasks waiting in the queue

  • In Linux, swap memory is a space on a disk that is used when the amount of physical RAM (Random Access Memory) is full. When the system needs more memory resources and the RAM is fully occupied, it swaps out less used pages from the RAM to the swap space.


13] What are the important system directories in linux what they used for

/root --> root users home dir

/home --> uses home dir

/etc --> config files

/bin --> user binary files

/sbin --> system binary files

/var --> variable file

/opt --> thirdpart file

/dev --> device file

/usr --> user appliction

/mnt --> mount point

/sys --> virtual file system

/tmp --> temporary file

/lib --> system library
/proc --> process info

/media --> removable devices

/lost-found --> recover broken files

/run --> temporary file system

/boot --> boot loader files

/srv --> service data directory


14] What are the package installers for Redhat, Ubuntu, Debian, CentOS, Alpine

Redhat-rpm, yum

Ubuntu-apt

Debian-dpkg, apt

CentOS-yum,dnf

Alpine-apk