OpenSuse Linux: How to Read Logs or Log Files

How do I read and/or view logs files under a OpenSuse or Novell Enterprise Linux?

You can use the following commands to view / read logs under OpenSuse / Novell Linux or UNIX like operating systems:
  • tail command – The tail command displays the contents of file on screen. It can show logs in real time too.
  • [donotprint]
    Tutorial details
    Difficulty level Easy
    Root privileges Yes
    Requirements None
    Est. reading time 1m
  • grep command – The grep command is used to search the log files.
  • less command – Another command which can display logs.
  • yast / yast2 command – YaST View Start-up Log displays not only the start-up (or boot) log, but various other bits of information.

Log Directory Location

Your logs files are stored in /var/log directory (you must be root user to view log files):

    /var/log/message: General message and system related stuff
    /var/log/boot.log : System boot log
    /var/log/mysqld.log: MySQL database server log file
    /var/log/secure: Authentication log
    /var/log/utmp or /var/log/wtmp : Login records file
    /var/log/yum.log: Yum log files

How Do I View Log File?

To see /var/log/messagess log file, enter:

tail -f /var/log/messagess
less /var/log/messagess
more /var/log/messagess

How Do I Search Log File?

Use the grep command as follows:
grep 'search-string' /var/log/messages
egrep 'word1|word2' /var/log/messages
grep --color 'search-wrod2' /var/log/boot.msg

YasT command

YaST is the most powerful installation and system management tool in the Linux environment. You can start YaST by typing the yast command. You can read or configure logs files with this tool too:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 4 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
4 comments… add one
  • gad Feb 19, 2014 @ 8:18

    Dears , to view the /var/log/wtmp use last command not tail or less because it will give meaningless result (in suse 10)

  • Nan Xiao Sep 18, 2015 @ 5:38

    “start You can YaST by typing yast” should be “You can start YaST by typing”.

    • 🐧 Vivek Gite Sep 18, 2015 @ 11:29

      Thanks for the heads up!

      • Nan Xiao Sep 19, 2015 @ 4:10

        Could you write a little detailedly about YaST2? I think it is too simple …

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum