How to use the command line to change GTK settings easily.

The settings used by the file chooser in MATE or Gnome can be changed easily with the command line. The gsettings utility makes this easy. This example will alter the Firefox file chooser, it will have directories listed first, in descending order, sorted by date modified. gsettings set org.gtk.Settings.FileChooser sort-column ‘modified’ gsettings set org.gtk.Settings.FileChooser sort-order … Read more

It is very useful to have knowledge of the command line. Here are some useful tips for you.

If you need to perform a command a second time on a different file, you can use command replacement with the ^ symbol. e.g. cp foo.txt /to/some/directory then ^foo^bar, expanding to: cp bar.txt /to/some/directory. To find information about a particular command, the apropos utility can be very helpful, this will search the system and find … Read more

How to view programs on your network that are hogging your network bandwidth.

How to use a simple Linux utility to see what is hogging your network bandwidth. The nethogs utility allows you to see what is hogging your bandwidth. Type sudo apt-get install nethogs to install this. Then run it like this: 4.4 Mon Dec 17 jason@Yog-Sothoth 0: $ sudo nethogs 1) All commands run with root … Read more

How to use rsync to list filenames in a directory on a remote Linux server.

The rsync command with the –list-only parameter allows the user to list filenames on a remote machine. But by default, it looks like this. jason@Yog-Sothoth » ~ » $ rsync –list-only [email protected]:/home/jason/Documents/ [email protected]’s password: drwxr-xr-x 4,096 2018/05/09 09:49:49 . -rw-r–r– 867,863 2018/04/19 12:44:56 altis_insurgency_altis.pbo -rw-rw-r– 681,638 2018/05/04 09:03:16 pg768.txt -rwxrwxr-x 166 2018/01/17 09:48:52 rhsafrf.0.4.5.bikey -rwxrwxr-x … Read more

A useful posting explaining why Linux does not need defragmenting.

If you are interested in how the Linux filesystem works, then this is a posting you really need to read: http://geekblog.oneandoneis2.org/index.php/2006/08/17/why_doesn_t_linux_need_defragmenting. This is a posting explaining how the Linux filesystem stores file and why it does not need to defragment the filesystem as it stores files more efficiently. I have never wanted to defragment a … Read more

Some useful tips for listing directories with ls on Linux.

To list the contents of a directory with the listing sorted by size, use the parameters in this example. ls –format=long –sort=size -hls –format=long –sort=size -h This is what you will get. total 15G -rw-rw-r– 1 ubuntu ubuntu 15G Dec 2 2014 crackstation.txt -rw-rw-r– 1 ubuntu ubuntu 20M Mar 20 2015 system.save -rw-rw-r– 1 ubuntu … Read more

The ss command. A very useful way to find open and listening ports on a Linux system.

The ss command for Linux allows a user to list all listening ports on a Linux system. This command lists all listening TCP ports. homer@deusexmachina ~ $ ss -l -t State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 1 127.0.0.1:4101 *:* LISTEN 0 50 *:netbios-ssn *:* LISTEN 0 128 *:sunrpc *:* LISTEN 0 128 … Read more

How to get the CPU speed from the hardware in Linux with the dmidecode command.

How to get the CPU speed from the hardware in Linux with the dmidecode command. This command below will suffice. [root@localhost jason]# dmidecode –type 17 | grep -i speed Speed: 1333 MT/s Configured Clock Speed: 1333 MT/s Speed: 1333 MT/s Configured Clock Speed: 1333 MT/s Speed: Unknown Configured Clock Speed: Unknown Speed: Unknown Configured Clock … Read more

Finding files with the Linux command line. Using find & locate.

Finding files with the Linux command line. Using find & locate The find command on Linux is very useful for finding commands on your Linux installation. In the example below, I am using wild-cards to look for all the c source files in a certain folder. neo@deusexmachina:~/Documents$ find -name "*.c" ./strobe.c ./myftp.c ./utv_gd.c ./syscall.c ./program.c … Read more

Setting up the normal user account on Debian GNU/Linux to use sudo.

Setting up the normal user account on Debian GNU/Linux to use sudo Setting up your normal user account on Debian to use the sudo command instead of the su command is very simple. This is the contents of my /etc/sudoers file. This line: neo ALL=(ALL:ALL) ALLneo ALL=(ALL:ALL) ALL Is the one that defines our normal … Read more

How to see whether a command is a executable or a shell builtin.

The type command for bash will tell you whether a command is a shell built-in or an executable on it`s own. This is very simple to use. This example shows how it works. jason@DESKTOP-G1QN8C6:~$ type -a echo echo is a shell builtin echo is /bin/echojason@DESKTOP-G1QN8C6:~$ type -a echo echo is a shell builtin echo is … Read more

How to embed the output of a command into a bash script.

Embedding the output of a command into a bash shell script is quite easy. Here is an example. echo "Hello $(whoami), the date is $(date -u). Have a nice day"echo "Hello $(whoami), the date is $(date -u). Have a nice day" This is the output this will give you. ┌─[jason@neo]─[~] └──╼ $echo "Hello $(whoami), the … Read more

Very useful Linux tips and tricks for the Linux desktop user.

How to make the Xterm font larger.Using the .inputrc file to control keybindings in xterm.Enabling color ls output.Viewing files with the command-line. How to make the Xterm font larger. To make the Xterm font larger, hold the left Ctrl key down and right-click on the xterm window to bring up a menu that allows the … Read more

Updating the grub2 boot-loader menu & adding swap space to your computer.

How to update the GRUB bootloader menu on Linux To update the grub bootloader on your Linux box, this is another way to do this. grub-mkconfig > /boot/grub/grub.cfggrub-mkconfig > /boot/grub/grub.cfg This will update the grub2 bootloader and add any new kernels in /boot. Creating a new swapfile for your Linux system. Firstly we create a … Read more

Find the distance of a light-year and other units with the Linux command line.

This command will show how many kilometers there are in a light year. jason$ units -t ‘1 light year/kilometers’ 9.4605284e+12jason$ units -t ‘1 light year/kilometers’ 9.4605284e+12 If I travelled 800m in 9.58 seconds how many miles per hour is this? jason$ units -t ‘800m/9.58s’ ‘miles/hour’ 186.80053jason$ units -t ‘800m/9.58s’ ‘miles/hour’ 186.80053 Using it this way, … Read more

Use the find command in Linux to look for multiple file types at once.

The Linux find command is useful for finding files on your Linux system. It is possible to look for more than one file type. This example will search for all text and png files under the /usr/share directory. jason@neo:/usr/share$ find -regex ‘.*txt\|.*png’jason@neo:/usr/share$ find -regex ‘.*txt\|.*png’ This example will search for three different file types. jason@neo:/usr/share$ … Read more

Get a listing of all the urls on a website with this simple Linux command.

This command will return a huge listing of all the visitable url`s on the http://www.google.com.au website. Give this a shot on other websites and see how you go. jason@jason-desktop:~$ wget –spider –force-html -r -l2 http://www.google.com.au 2>&1 | grep ‘^–‘ | awk ‘{ print $3 }’jason@jason-desktop:~$ wget –spider –force-html -r -l2 http://www.google.com.au 2>&1 | grep ‘^–‘ … Read more

Get the command line of a process without the ps command.

To get the command line of a process without the ps command, and the PID of the command is known, use this command. This example is using a process with a PID of 28633. ubuntu ~ $ cat /proc/28633/cmdline ; echo upstart-socket-bridge–daemonubuntu ~ $ cat /proc/28633/cmdline ; echo upstart-socket-bridge–daemon This will show the command line … Read more