Soluții

How to find Linux kernel version

Linux stores version information in a file called /proc/version. As a sysadmin you need to know the Linux distro ver number of the Linux kernel on given server or workstation. This information can be used for the following purpose.

  1. To fix device driver issue.
  2. Install correct device driver for NIC/RAID card.
  3. Diagnosing system problems.
  4. Security and patching system for bugs.
  5. Upgrading system and more.
How to find Linux kernel version

You need to type the following command at shell prompt:
$ uname -r
Sample outputs from RHEL 5:

2.6.18-194.3.1.el5

Another outputs from Fedora 30:

5.1.16-300.fc30.x86_64
How to check Linux version using /prov/version file

Type the following cat command to print out information about the running Linux kernel:
$ cat /proc/version
Sample outputs from RHEL 5:

Linux version 2.6.18-194.3.1.el5 (mockbuild@x86-004.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Sun May 2 04:17:42 EDT 2010

Please note that you can also use the following command:
$ uname -a
Sample outputs:

Linux b1 3.2.0-51-generic #77-Ubuntu SMP Wed Jul 24 20:18:19 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Another outputs from my Fedora Linux desktop:
Check Linux Kernel Version in Command Line

Checking Linux kerne version using dmesg

Another useful option is to type the following dmesg command along with grep command:
dmesg | grep 'Linux version'
dmesg | grep Linux

Sample outputs:

[    0.000000] Linux version 5.1.16-300.fc30.x86_64 (mockbuild@bkernel04.phx2.fedoraproject.org) (gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)) #1 SMP Wed Jul 3 15:06:51 UTC 2019
[    0.667677] SELinux:  Initializing.
[    0.667697] *** VALIDATE SELinux ***
[    0.691958] ACPI: Added _OSI(Linux-Dell-Video)
[    0.691958] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.691958] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    0.808940] pps_core: LinuxPPS API ver. 1 registered
[    1.754325] Linux agpgart interface v0.103
[    1.788277] usb usb1: Manufacturer: Linux 5.1.16-300.fc30.x86_64 xhci-hcd
[    1.789649] usb usb2: Manufacturer: Linux 5.1.16-300.fc30.x86_64 xhci-hcd
[   31.626968] SELinux:  policy capability network_peer_controls=1
[   31.626970] SELinux:  policy capability open_perms=1
[   31.626970] SELinux:  policy capability extended_socket_class=1
[   31.626971] SELinux:  policy capability always_check_network=0
[   31.626972] SELinux:  policy capability cgroup_seclabel=1
[   31.626972] SELinux:  policy capability nnp_nosuid_transition=1
[   31.653735] systemd[1]: Successfully loaded SELinux policy in 755.735ms.
[   32.980279] Intel(R) Wireless WiFi driver for Linux
[   34.349592] VBoxPciLinuxInit
[ 1784.165279] SELinux:  Converting 2546 SID table entries...
[ 1786.470382] SELinux:  policy capability network_peer_controls=1
[ 1786.470383] SELinux:  policy capability open_perms=1
[ 1786.470383] SELinux:  policy capability extended_socket_class=1
[ 1786.470383] SELinux:  policy capability always_check_network=0
[ 1786.470384] SELinux:  policy capability cgroup_seclabel=1
[ 1786.470384] SELinux:  policy capability nnp_nosuid_transition=1
[ 1804.575674] SELinux:  Converting 2559 SID table entries...
[ 1807.034856] SELinux:  policy capability network_peer_controls=1
[ 1807.034857] SELinux:  policy capability open_perms=1
[ 1807.034858] SELinux:  policy capability extended_socket_class=1
[ 1807.034859] SELinux:  policy capability always_check_network=0
[ 1807.034859] SELinux:  policy capability cgroup_seclabel=1
[ 1807.034860] SELinux:  policy capability nnp_nosuid_transition=1
Using hostnamectl command

Simply run the following hostnamectl command on systemd based distros:
hostnamectl
Sample outputs:

   Static hostname: mum1-vpn1
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 612892249edc4cf7b40cdfd1534feded
           Boot ID: f6285443d8544cb1a04878e0f2b13056
    Virtualization: kvm
  Operating System: Ubuntu 18.04.2 LTS
            Kernel: Linux 4.15.0-54-generic
      Architecture: x86-64

The above command displays both the Linux distribution and kernel version.

[mai mult...]

How to Turn On “Do Not Disturb” While Driving on Google Pixel

Distracted driving is a big problem, and phones only make it worse. Wouldn’t it be nice if you could automatically block unimportant notifications while you’re driving? If you have a Google Pixel phone, you can do exactly that.

“Do Not Disturb” can be set up to block notifications automatically for certain situations. This saves you from having to remember to turn it on and off all the time. The Pixel 3 and newer Pixel phones can also set it up to automatically turn on while you’re driving. Before you set up Do Not Disturb to run while you’re driving, you’ll need to decide what it actually does when it’s enabled. Turning on Do Not Disturb isn’t very useful if you don’t customize it.

Do Not Disturb includes a number of useful options so that you can fine-tune who and what will be able to get ahold of you when your phone is muted. Be sure to read our full guide on Do Not Disturb before enabling the driving feature.

[mai mult...]

How to Change Your Facebook Birthday After Exceeding the Limit

If Facebook has blocked you from changing your birthday for attempting to do so too many times, there’s still a way to request that the site change your birthday.

  • This is possible with a form that Facebook has put up on its site. Using this form, you can send Facebook a request to modify the birthday in your profile. It’s then up to Facebook to accept or reject your request.
  • To put in a birthday change request, open a web browser on your Windows, Mac, Linux, or Chromebook computer and head over to the Request a Birthday Change web page on the Facebook site.
  • On that web page, use the drop-down menus under the “Date of Birth” section to specify your new birthday. Then, click the “Reason for This Change” drop-down menu and choose why you’re changing your birthday.
[mai mult...]