Skip to content

Linux

What is -h vs --help in Linux command?

-h vs --help

To sum up, the Linux shell provides access to help information for commands through both -h and —help.

However, —help is a more uniform and universal option that may be used with a variety of commands. Shorter and occasionally used, -h can have varying availability and significance.

It is advised to use --help to reliably obtain help information, particularly for commands that are unknown.

Install Package Based on Distros

Depending on the Linux distribution you are using, it will have a different Linux package manager. Here's a quick list of each package manager for popular distributions.

https://en.wikipedia.org/wiki/List_of_Linux_distributions

Debian Based

Example

Debian, Ubuntu, Linux Mint

Package Format: .deb
APT (Advanced Package Tool): The primary package management system.

sudo apt update: Updates the package index.
sudo apt upgrade: Upgrades all installed packages to their latest versions.
sudo apt install <package_name>: Installs a package.
sudo apt remove <package_name>: Removes a package.
sudo apt autoremove: Removes unnecessary packages.

Backend: dpkg (Debian Package) is the low-level tool that APT uses to handle .deb files.

dpkg -i <package.deb>: Installs a package file.
dpkg -r <package_name>: Removes a package.
dpkg -l: Lists all installed packages

Clear the Java Web Start (javaws) cache

  1. Open your computer's DOS prompt by selecting the Start menu followed by the Run option. Then, enter command followed by pressing the Enter key.

  2. Type javaws at the DOS prompt followed by the Enter key to see the Java Web Start command-line options.

  3. Type javaws -Xclearcache followed by the Enter key to clear Java Web Start Cache on your computer. After the cache has been cleared, the local drive prompt will appear on the DOS prompt.

How to set semaphore limits

In some scenario, the application had a semaphore limit issue. We need to increase some semaphore limits, such as semaphore array.

How do we set the semaphore limits?

What values should we set for the semaphore limits?

# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 1024              ## SEMMNI
max semaphores per array = 250           ## SEMMSL
max semaphores system wide = 256000      ## SEMMNS
max ops per semop call = 32              ## SEMOPM
semaphore max value = 32767

What is -h vs --help in Linux command?

-h vs --help

To sum up, the Linux shell provides access to help information for commands through both -h and —help.

However, —help is a more uniform and universal option that may be used with a variety of commands. Shorter and occasionally used, -h can have varying availability and significance.

It is advised to use --help to reliably obtain help information, particularly for commands that are unknown.

Linux vs Windows Commands

SNo. Windows Linux Description
1. dir ls -l Directory listing
2. ren mv Rename a file
3. copy cp Copying a file
4. move mv Moving a file
5. cls clear Clear Screen
6. del rm Delete file
7. fc diff Compare contents of files
8. find grep Search for a string in a file
9. command /? man command Display the manual/help details of the command
10. chdir pwd Returns your current directory location
11. time date Displays the time
12. cd cd Change the current directory
13. md mkdir To create a new directory/folder
14. echo echo To print something on the screen
15. edit vim(depends on editor) To write in to files.
16. exit exit To leave the terminal/command window.
17. format mke2fs or mformat To format a drive/partition.
18. free mem To display free space.
19. rmdir rm -rf/rmdir To delete a directory.
20. taskkill kill To kill a task.
21. tasklist ps x To list running tasks.
22. set var=value export var=value To set environment variables.
23. attrib chown/chmod To change file permissions.
24. tracert traceroute To print the route packets trace to network host.
25. at cron daemon to execute scheduled commands.
26. type cat To print contents of a file.
27. ping ping To send ICMP ECHO_REQUEST to network hosts.
28. nslookup nslookup To query Internet name servers interactively.
29. chdisk du -s For disk usage.
30. tree ls -R To list directory recursively.