what is the lvm and where can you find its configuration?

View answer

The LVM is the Linux Volume Manager and its configuration is found under /etc/lvm/lvm.conf

given a local file /usr/bin/pstree” on the hd, how can you identify if it came from an rpm?

View answer

RPM allows you to reverse-query the RPM DB and search its files by: rpm -qf /usr/bin/pstree

given installed rpm file “xinetd-2.3.14-10.el5” how can you know which files on the system belong to this rpm?

View answer

RPM allows you to query an RPM and identify its files by: rpm -ql xinetd-2.3.14-10.el5.

what is the difference between a swap file and a swap partition?

View answer

A swap file is a local file on your partition and can be used by the current system, whereas the swap partition is a standalone partition and can be used by multiple OS.

how can you turn your linux server into a router?

View answer

In order for the Linux server to allow routing, you need to allow ip forwarding on it by: echo "1" > /proc/sys/net/ipv4/ip_forward and setting net.ipv4.ip_forward = 1 in /etc/sysctl.conf

how can you define the log level of the messages that are written to /var/log/messages?

View answer

The logs that are being sent to the messages log are being managed by the syslogd which is configured in /etc/syslog.conf

how do you add a virtual network interface on eth0 with the ip 10.10.10.1 on class c?

View answer

You can add virtual interfaces on eth cards that will hold additional system IPs - ifconfig eth0:0 10.10.10.1 netmask 255.255.255.0.

what is the difference between “kill ” and “kill -9 ”?

View answer

When adding “-9” to the kill command, it tells the PID to exit immediately instead of exiting in the correct way - cleaning children/temp/sockets.

how do you change the user tom’s login shell to /bin/sh?

View answer

You need to use the command chsh -s /bin/sh tom.

how can you change your server timezone to a europe/france timezone?

View answer

You need to link the file /usr/share/zoneinfo/Europe/Paris to /etc/localtime.

how can you find which of the users (residing in /home/) are using the most hd space?

View answer

You should use the du tool to get the HD usage and find the most heavy directories - du -hs /home/* | sort -nr | head -10.

you want to traceroute a remote server with an interactive interface and fast resolution (more than traceroute), how can you do it?

View answer

The mtr tool allows you a fast and much more interactive solution for the server administrator than traceroute.

you want to encrypt and password-protect a password file “mysecret.txt”, how can you do it with gpg and then decrypt it to view the contents?

View answer

In order to gpg encrypt a file, you type “gpg -c mysecret.txt” and choose your desired password. In order to decrypt it and view the contents, you type “gpg -d mysecret.txt.gpg”

if i have configured the parameter ttl in my domain configuration file (named) to 14400, what does it mean?

View answer

The domain TTL configuration is setting the time which name-servers querying the name server will cache the results in their DB before asking the server for new configuration. 14400 seconds is 4 hours.

you have a scripts directory called /scripts/ and you want to add it temporarily to your executable path, how can you do that?

View answer

Your executable path are extracted from the environment $PATH, you can add temporary item to it on the current shell using - export PATH=$PATH:/scripts.

given the text “fileone,filetwo,filethree,filefour”, you need to delete all of the .sh files with those names (fileone.sh filetwo.sh…), how can you do it with brace expansion?

View answer

In order to use brace expansion, you need to add it to take the list and use it in braces - rm -f {fileone,filetwo,filethree,filefour}.sh.

what is a linux iso?

View answer

Downloadable binary file containing a CD/DVD disc image of a Linux distribution

how do you send a sigkill to a process?

View answer

kill -9

what is the limit of a linux file name?

View answer

256 Characters.

what is the difference between `echo hello > tmp.log` and `echo hello >> tmp.log`?

View answer

When using > you truncate the file and insert a new row, when using

you add new line at the end of the file.

Subscribe to our Newsletter

Join our newsletter and get news in your inbox every week! We hate spam too, so no worries about this.

mail