FREE OSCP Linux Questions and Answers
What makes using -p with netstat unique?
Answer: Like echo, it lets you print to the screen, except it writes actual text rather than ignoring single and double quotes. Additionally, you may use it to input a line of instructions into an application like ssh or cat.
In the context of netstat, the -p flag is used to display the process ID (PID) and name of the program associated with each network connection or listening port. It provides information about the processes using the network resources.
Linux file system that is virtualized and gives you access to the kernel's perspective
In a Linux system, the /proc directory provides a virtualized file system that allows users and programs to access information about processes and the system itself, including how the kernel sees various aspects of the system.
How should a lengthy command that has been piped numerous times and contains multiple instructions be executed in the background?
Answer: It must be enclosed in parenthesis, and at the end, the & must appear outside the parenthesis (commands; commands | commands) &.
To execute a long command that involves multiple commands piped together and run it in the background, you can enclose the entire command sequence within parentheses and place the ampersand (&) outside the closing parenthesis.
File for creating cron jobs.
In Linux systems, the file commonly used for creating cron jobs is /etc/crontab
The /etc/crontab file is a system-wide configuration file that allows you to define scheduled tasks, known as cron jobs. Each line in the file represents a single cron job entry, specifying the timing and command to be executed.
The location of the log files.
In Linux systems, log files are typically stored in the /var/log directory. This directory is the default location where various system services and applications write their log files to record important events, errors, and other diagnostic information.
Where system binaries (programs) are stored
System binaries, or programs that are essential for the functioning of the Linux system, are typically stored in the /sbin directory.
The /sbin directory is a specific location where system administrators and the root user can find important executable binaries. It stands for "system binaries" and contains commands and utilities that are crucial for system administration and maintenance tasks.
Where .so (Library file, stands for "shared object") are stored (basically like Windows .dll files).
/lib and /lib64: These directories contain essential system libraries that are necessary for the basic functioning of the operating system. /lib is used for 32-bit libraries, while /lib64 is used for 64-bit libraries.
Please note that the exact locations of the libraries may vary depending on the Linux distribution and version you are using. Additionally, specific applications may have their own directories for storing libraries.