Skip to main content
15 votes

How to use the 'date' command to display week number of the year?

There are two kinds of week: Monday as first day Sunday as first day So its not all the same when you are in different day of a week(CentOS7): [[email protected]:~]# date Mon Aug 26 18:02:47 CST ...
Valiant Jiang's user avatar
10 votes

How to use the 'date' command to display week number of the year?

There are actually 3 kind of week number in year for the date command : %U week number of year, with Sunday as first day of week (00..53) %W week number of year, with Monday as first day of ...
Nicolas WAGNER's user avatar
9 votes

How can I tell what version of Linux I'm using?

There are a ton of answers but I'm looking for more generic. AFAI am concerned the following works on most of systems. cat /etc/os-release Example output: sh-4.4$ cat /etc/os-release ...
Soner from The Ottoman Empire's user avatar
6 votes

Get the hardware model name in linux

Reading the source code of Neofetch made the confusion clear. Line 1174 for Neofetch version 7.0.0 has a condition check: if [[ -d /system/app/ && -d /system/priv-app ]]; then model="$(...
15 Volts's user avatar
  • 2,149
6 votes

How to find hardware/chipset name using terminal in Linux

Your particular chipset’s PCI id is shared by the four variants in the family, and distinguishing between them involves looking at the capability identifier in the PCI configuration registers. Section ...
Stephen Kitt's user avatar
5 votes
Accepted

How to change OEM vendor info?

BIOS writers provide tools to update the DMI information, without needing to modify BIOS images, to companies which manufacture devices using those BIOSs. For example, AMI has a AMIDEDOS tool under ...
Stephen Kitt's user avatar
5 votes
Accepted

Format the output of commands

This can be achieved by adding echo "" in the middle of the commands where the space is required. Here are some example. Adding new line in the middle. Example: df | fgrep '/dev/'; echo ""; free ...
Vivek Kanadiya's user avatar
5 votes

How can I tell what version of Linux I'm using?

To combine some ideas here: cat /etc/*_version /etc/*-release && uname -a Should get you want you need on any distribution.
Adam Grant's user avatar
4 votes

Zsh do utilities distinction

When a word appears in a command position, the first thing that zsh checks is if it's an alias or a reserved word. This happens early on, as part of grammatical parsing. Zsh knows about reserved words ...
Gilles 'SO- stop being evil''s user avatar
3 votes
Accepted

Get the hardware model name in linux

There is no a portable, reliable, generic method to retrieve hardware model name in Linux. Let me describe 2 different cases: ARM-based Raspberry Pi with Raspbian installed and MIPS-based TP-LINK ...
Arkadiusz Drabczyk's user avatar
3 votes

How do I check the running kernel version?

For Ubuntu enter the command # uname -r will Print the kernel name # uname -a Will Print all Information or else we can check with cat /proc/version For Redhat and centos # cat /etc/redhat-...
Javeed Shakeel's user avatar
3 votes

How can I find the hardware model in Linux?

Or this lshw -short | grep system
DimiDak's user avatar
  • 232
3 votes

How do I find out the build version to download with LEDE?

That information can be found in /etc/openwrt_release under DISTRIB_TARGET DISTRIB_ID='LEDE' DISTRIB_RELEASE='17.01.2' DISTRIB_REVISION='r3435-65eec8bd5f' DISTRIB_CODENAME='reboot' DISTRIB_TARGET='...
Evan Carroll's user avatar
  • 35.1k
3 votes

How can I tell what version of Linux I'm using?

inxi is a System Information Tool for Linux. It displays handy information concerning system hardware (hard disk, sound cards, graphic card, network cards, CPU, RAM, and more), together with system ...
Ahmad Ismail's user avatar
  • 3,100
2 votes

Is there a way to clearly define hardware controller?

You can do that both ways, from devices names as they are now standardized or detecting them from dmidecode or lshw command also cat /proc/mdstat also lspci -knn | grep 'RAID bus controller' or lshw -...
francois P's user avatar
  • 1,299
2 votes

Windows Command Prompts 'systeminfo' command equivalent on Ubuntu

I'm not using Windows, so I'm not sure what can systeminfo do, but here are few commands based on screenshots I googled. Basic system information: hostnamectl $ hostnamectl Static hostname: vtrefny-...
Vojtech Trefny's user avatar
2 votes

Windows Command Prompts 'systeminfo' command equivalent on Ubuntu

Try inxi: $ inxi CPU: 6-Core Intel Core i7-8700K (-MT MCP-) speed/min/max: 800/800/4700 MHz Kernel: 5.4.0-52-generic x86_64 Up: 7h 17m Mem: 12886.2/32061.5 MiB (40.2%) Storage: 6.37 TiB (35.2% used) ...
pLumo's user avatar
  • 23.2k
2 votes

How to use the 'date' command to display week number of the year?

don't mess calendar week/year with ISO week/ISO year! e.g. the solution echo "So this is week `date +%V` of `date +%Y`." is not correct!, because for example for 1.1.2023 it will return ...
Fedor's user avatar
  • 89
2 votes

Making a "About PC" boot opion in GRUB 2

It depends. Are you skilled in any programming language? Frankly, figuring out things like total number of packages installed and the version of your shell would be hard to find out within GRUB. Since ...
telcoM's user avatar
  • 114k
1 vote

get connected monitor(s) details on a Debian system

try hwinfo (possibly not installed by default - sudo apt-get update sudo apt-get -y install hwinfo then: # hwinfo --monitor 20: None 00.0: 10002 LCD Monitor [Created ...
stuartah's user avatar
  • 185
1 vote

How to use the 'date' command to display week number of the year?

I'd like to add the command substitution using backquotes (``) like this: echo "So this is week `date +%V` of `date +%Y`." They are evaluated before the expression is processed further and ...
matt's user avatar
  • 11
1 vote

How do I check the running kernel version?

dmesg | grep Linux This command reads boot logs as it startup. Output: [ 0.000000] Linux version 4.9.0-8-amd64 ([email protected]) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+...
Yousha Aleayoub's user avatar
1 vote

How can I tell what version of Linux I'm using?

A problem I found with the practical uname-a is that, in microsoft's wsl, it always returns something like (even inside docker containers!): Linux d0b341b1f694 5.10.16.3-microsoft-standard-WSL2 #1 SMP ...
kaiserlautern's user avatar
1 vote

How can I tell what version of Linux I'm using?

whatami by Remy Evard at Argonne National Lab. Install and run using these commands: $ wget https://raw.githubusercontent.com/open-mpi/mtt/master/client/whatami/whatami && chmod a+x whatami ...
emallove's user avatar
  • 148
1 vote

Getting information on a machine's hardware in Linux

HW Probe — is an option to list all your hardware devices and make diagnostics of operability. It's based on hwinfo, lspci, lsusb, dmidecode and other tools.
linuxbuild's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible