Quantcast
Channel: Linux Guides, Tips and Tutorials | LinuxScrew
Browsing all 314 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Converting to Integer with JavaScript parseInt() [Examples]

This article will show you how to use the parseInt() function in the JavaScript programming language. JavaScript is notoriously loosely typed – meaning that variables of one type (e.g., strings of...

View Article


Image may be NSFW.
Clik here to view.

Using the ‘sleep’ Function in Bash Scripts, with Examples

This article explains the sleep command in Bash/Shell scripts and how and why you might use it. The sleep command in Bash (and other Linux Shells) pauses execution for a specified amount of time –...

View Article


Image may be NSFW.
Clik here to view.

Using the ‘sed’ Command in Bash/Linux, With Examples

The sed (Stream EDitor) command in Bash/Linux reads text from a stream or file and performs line-by-line operations on it based on a set of supplied criteria.  Here’s how to use it. sed is an automated...

View Article

Image may be NSFW.
Clik here to view.

How to Use Functions in Bash/Shell Scripts, With Examples

This article will explain how to use functions in Bash scripts – helping you to reuse your code and simplify your scripts. Why write code multiple times when you can write it once and re-use it? That’s...

View Article

Image may be NSFW.
Clik here to view.

Compare JavaScript Dates (Day/Minute/Hour/Before/After), With Examples

Following on from our article on adding and subtracting time from dates in JavaScript – here’s how to compare two JavaScript date objects. This article will explore comparing dates/times with different...

View Article


Image may be NSFW.
Clik here to view.

DIY Raspberry Pi/Python Powered PACHINKO [Kitchen Build]

Pachinko? Pichinko? Pychinko? I’ve been playing around with is idea for a while because… I don’t know; it seemed like a cool concept. That’s my whole motivation. Here’s a Raspberry Pi and...

View Article

Image may be NSFW.
Clik here to view.

How to Refresh the Page in JavaScript using location.reload(), With Examples

Here’s a short guide to refreshing a webpage with JavaScript, with examples. There are over 500 ways to trigger a page reload using JavaScript. All but one are unofficial or are the side effect of...

View Article

Image may be NSFW.
Clik here to view.

jQuery vs JavaScript – Differences? Which is Better?

This article will explain what JavaScript and jQuery are, how they differ, and how/why they should be used. What is JavaScript JavaScript began life in the mid-1990s as a scripting language for adding...

View Article


Image may be NSFW.
Clik here to view.

Variables in Bash/Shell Scripts and How To Use Them [Tutorial]

This article will show you how to use variables in Bash and Shell scripts in Linux. Bash (or Linux Shell) scripts are files you write containing commands to automate common tasks and save yourself some...

View Article


Image may be NSFW.
Clik here to view.

Math/Arithmetic in Bash/Shell Scripts, With Examples

Math is easy, Bash scripting is easy, so performing math/arithmetic in Bash/Shell scripts should be easy too. It is. Here’s how to do it. Working with Integers Bash’s built-in arithmetic can only...

View Article

Image may be NSFW.
Clik here to view.

JavaScript Callback Functions How-To, With Examples

This article will explain callback functions in JavaScript – what they are, why they’re used, and how to use them. What is a Callback in the JavaScript Programming Language? A callback function is a...

View Article

Image may be NSFW.
Clik here to view.

PHP include – How to Use It, With Examples

The PHP include expression allows you to import code from another file and import code from external PHP libraries. Here’s how to use it, with examples. PHP include will execute and import PHP code...

View Article

Image may be NSFW.
Clik here to view.

Command Line Arguments in Python Scripts, With Examples

This article will show you simple methods to pass command line arguments to your Python scripts, with some examples. Passing arguments to your script makes it easy to build multi-use scripts that can...

View Article


Image may be NSFW.
Clik here to view.

Concatenate Strings in Bash/Shell Scripts, With Examples

Here’s a short article on concatenating (merging) strings in Bash – the right way. Examples included. There are various ways two or more strings could be joined in a shell script. Various programs will...

View Article

Image may be NSFW.
Clik here to view.

Calculating Absolute Values in Python, With Examples

In this article, you’ll learn about absolute values – what they are, how they’re used, and how to use the Python abs() function to calculate them. What is the Absolute Value of a Number? The absolute...

View Article


Image may be NSFW.
Clik here to view.

Why You Should Use Linux in 2021

Here’s a bunch of reasons to try out (or continue using) Linux in 2021. Lots has changed on the Linux front in the last decade – here’s why you should give Linux a go. I’ve been using Linux on desktop...

View Article

Image may be NSFW.
Clik here to view.

Remove a User From the Linux Command Line/Shell – How to Do It

Here’s a short and sharp article on how to remove a user from a Linux system. These examples will work on the majority of Linux distributions. The userdel Command The userdel command can be run from...

View Article


Image may be NSFW.
Clik here to view.

Redirect stdin, stdout, stderr in Linux/Bash, With Examples

The Linux/Bash shell has three data streams that you can tap into when executing commands – stdin, stdout, and stderr. Here’s how to use them. stdin, stdout, stderr allow for the display of text in the...

View Article

Image may be NSFW.
Clik here to view.

Getting the Absolute (Full) and Relative Path In Linux

This article explains absolute paths and how they differ from relative paths, getting them, and how symbolic links are handled. FileSystem Paths A path is the location of a file in a file system. It’s...

View Article

Image may be NSFW.
Clik here to view.

Running Ubuntu in VirtualBox on Windows/Mac [Tutorial]

Here’s a straightforward set of instructions (with lots of screenshots) on how to set up Ubuntu Linux in VirtualBox for running Ubuntu in a Virtual Machine on Windows 10 and macOS. VirtualBox allows...

View Article
Browsing all 314 articles
Browse latest View live