Skip to content

Instantly share code, notes, and snippets.

View JQL's full-sized avatar

John Lavelle JQL

View GitHub Profile
@JQL
JQL / com.ubuntu.pkexec.xampp.policy
Last active March 25, 2023 16:18
How to use pkexec to add XAMPP to the Linux Mint Menu. Note, it also works on Ubuntu and Ubuntu Mate with suitable changes.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>Apache Friends</vendor>
<vendor_url>https://www.apachefriends.org/index.html</vendor_url>
<icon_name>xampp</icon_name>
<action id="com.ubuntu.pkexec.xampp.policy">
<description>Run XAMPP Control Panel</description>
<message>Authentication is required to run the XAMP Control Panel</message>
@JQL
JQL / Linux Partitions
Last active August 25, 2018 10:37
Linux Partitions - new file system
Linux Partitions - new file system
1. Create a Partition Table.
2. Create a Boot Partition at the beginning of the Drive (not necessary for an SSD or modern BIOS but good practice so you don't forget when on a "spinning rust drive"):
a. Use Ext2 file system (no journaling):
b. Mount Point: /boot
c. Make the size: >=512MB
d. Primary Partition and "Beginning of this space"
@JQL
JQL / TerminalCommands
Last active August 25, 2018 10:48
Some of the basic Linux Terminal commands
Basic Terminal Commands
A run through of some of the basic Terminal commands. Remember Linux is case sensitive so "hello" is not the same as "Hello".
You may be used to using the term "Folder". The terms Directory and Folder are interchangable.
COMMANDS & LINKS:
CTRL + ALT + T : Launch Terminal
whoami : Who you are logged in as
@JQL
JQL / LScommand
Last active August 25, 2018 10:47
How to list files in the Linux (BASH) Terminal
The "ls Command
How to list files in Terminal
COMMANDS & LINKS:
ls : list current directory
ls -l : list current directory using the "long" format
ls -a : list all the files, including hidden files, in the current directory
ls -al : list all the files, including hidden files, in the current directory using the "long" format
@JQL
JQL / FileCommands
Created August 25, 2018 10:49
Some terminal file commands.
File Commands
Some terminal file commands.
## __Warning__: The rm command removes files and directories. using the wrong switches with the rm command can delete the WHOLE of your Linux system! Always double check the command when using rm.
COMMANDS & LINKS:
mkdir stuff : Make a directory called stuff
rm -r stuff : Remove the directory called stuff
@JQL
JQL / chmod
Last active August 25, 2018 10:51
The Basic permissions in a Linux Terminal
CHMOD
Changing permissions in a Linux Terminal
COMMANDS & LINKS:
chmod o+w stuff : give "others" write access to the file "stuff"
chmod o-w stuff : remove write access for "others" from "stuff"
chmod a-x stuff : remove exucutable permissions from "stuff"
@JQL
JQL / sudoInto
Created August 25, 2018 10:52
An introduction to Super User (sudo) on Linux.
SUDO
An introduction to Super User (sudo) on Linux.
COMMANDS & LINKS:
sudo : Super User do, run the command with Super User permissions.
cat stuff : Display the contents of stuff in terminal
sudo cat /proc/cpuinfo &gt; ~/stuff : copy the contents of /proc/cpuinfo into ~/stuff
sudo chown john:john stuff : Change the ownership of a file or directory to user: john and group: john
@JQL
JQL / EnablingPasswordFeedback
Created August 25, 2018 10:54
Enabling password feedback in Terminal
Enabling password feedback in Terminal
When you run a command with sudo in Linux, the terminal prompts you to type in your password and doesn't give you any visual feedback. Here is a quick tweak that will display asterisks (*) when you type in your password.
IMPORTANT: Only make the change shown below. DO NOT make any other changes to the file.
In Terminal, run the command:
sudo visudo
Find the line (use the up or down arrow keys on your keyboard):
@JQL
JQL / UpdateUpgrade
Created August 25, 2018 10:56
Linux Updates and Upgrades
Updates and Upgrades
How to keep your Linux system up to date.
COMMANDS & LINKS:
sudo apt-get update : Update the packages on your Linux system
sudo apt-get upgrade : Apply the updates
sudo apt-get autoremove : Remove out of date and obsolete packages
@JQL
JQL / TweakPackages
Created August 25, 2018 10:57
Tweaking Linux Packages
Tweaking Linux Packages
The Linux Package system and the Linux Mint package manager recommended "Tweak".
How to setup the Package Manager
COMMANDS & LINKS:
Synaptic Package Manager:
Click Menu button - Administration - Synaptic Package Manager