Ubuntu Log File Location




I want to share about the location of important files or folders in Linux or Unix. Whatever Linux / Unix is ​​used, it almost has files or folders in the same order. The commands in the terminal are also the same for some basic commands (like ls, cp, mv, mkdir etc.).

Please open the terminal and type cd / then enter, this will make the prompt position will be on the outside or high, I prefer to call or at the highest because in this position we can see all the folders

Now type " ls -lah ", the folder list should appear as follows:


The above picture is a folder structure in Linux or Unix that follows the latest standards, namely FHS (Filesystem Hierarchy Standard), where with the standardization, we no longer need to open the folder to run a program after the program is installed because it has been neatly arranged. So wherever the prompt position in the terminal, we can execute the program.



When we type ls, the folder view will be displayed alphabetically from a - z.

Folder /bin, this is where the program for the most common commands like ls, rm, mkdir, cp etc. Yes, all Linux or Unix commands are here

Folder /boot, its contents Linux or Unix Kernel, Grub, Image RAM, just about everything that a Linux or Unix OS needs to Boot up.

Folder /dev contains all harddisk or hardware drives such as modem, CD or DVD or Blu-ray etc. It's just here is just a link and not the content,
For example hdd partition 1 is in /dev/sda1 and DVD-rom is in /dev/sr0.
To view its contents, mounting must be mounted first.

/etc contains the configuration files of programs or applications installed in the OS, eg Apache configuration is in /etc/apache2 and SSH in /etc/ssh. 

/home, here all files and folders belonging to a user are stored, for example /home/ ikons is the user's own ikons folder, this is also the initial folder when we remote into the ssh server with a username. If the Windows OS folder is similar folder C:\Users\. 

/lib, contains important files or folders such as program libraries or kernel modules. Usually the file dependency of a program must be put here. 

/media is a mount folder of external devices like external HDD, flashdisk, CD / DVD. usually when entering the flash to USB, the contents will automatically appear in the file manager, in fact it's location is in the folder /media. Different from in Windows OS which is only directly displayed in file explorer. 

/mnt is also a mount folder, it's just temporary and done manually, for example mount /dev/sdc2/mnt, then the file in HDD / flashd in /dev/sdc2 will appear in /mnt folder.

Folder /opt is usually filled with programs not installed through package manager (apt-get or yum), alias compile and install directly from the source code. 

/proc is a folder whose contents are files where the kernel receives information, for example the processor is in /proc/cpuinfo and ram in /proc/meminfo. 

/root, the name is root, this is the super user folder where when remote to ssh server using root will be redirected here, not in the home folder.

Folder /sbin contains all programs that can only be run by super user, alias must be in sudo/su first. 

/srv, this folder can also be filled by web server or ftp server. 

/sys is a folder where information about the system can be read by the kernel. 

/tmp, where temporary files are stored, usually when installing a program.

Folder /usr contains programs that are tools like gcc, git, vim, mysql etc. Anyway other than basic or simple programs like in the /bin folder. If in Windows OS is like Program Files folder.

The last one is the /var folder which is a folder whose content changes (increases or decreases) quickly, like the log file is in the /var/log folder, the email file (sendmail or postfix) in /var/mail or the web server in the folder /var/www (Fedora or CentOS is in the folder /home/user/public_html)

Hopefully the above info can help for those who are starting to learn Linux or Unix. If anyone is asked please comment below.


Next
Previous
Click here for Comments

0 comments: