How to send a message to logged on users on your Linux system with a simple command.

The wall command is a perfect way to send a message to all logged on users on a Linux machine. This is used when you shutdown to alert all users that the system will be shutting down. The example below shows me sending the output of the ps command to all users. ubuntu@ip-172-31-20-234:~$ sudo ps … Read more

More awesome GTK and WM themes for your Linux desktop.

Window manager themes. RISC styled WM theme for Xfce4: http://www.marutan.net/themes.php. GTK themes. Mac OS Classic theme for Xfce4: http://xfce-look.org/content/show.php?content=144719. Mac OS classic GTK2 theme: http://gnome-look.org/content/show.php/Mac+OS+9+Platinum+gtk+theme?content=110444. Plane GTK: http://gnome-look.org/content/show.php/Plane-Gtk3.6?content=156309. Classic 95 Windows `95 theme for MATE and Gnome: http://gnome-look.org/content/show.php/Classic95?content=157298. How to create a look-alike Windows XP desktop using IceWM: http://kmandla.wordpress.com/projects/lookalike-windows-xp-classic/. Windows 3.1 theme for Xfce4: http://xfce-look.org/content/show.php/Redmond3+%28Windows+3.1+theme%29?content=121526. … Read more

Some miscellaneous Linux commands.

To reboot your Linux machine, use the sudo reboot command. Another way is to type sudo shutdown -r now. This command will also shut down your machine. ┌─[jason@darkstar]─[~] └──╼ $sudo init 0┌─[jason@darkstar]─[~] └──╼ $sudo init 0 Use this command to reboot your computer. ┌─[jason@darkstar]─[~] └──╼ $sudo init 6┌─[jason@darkstar]─[~] └──╼ $sudo init 6 To lookup the … Read more

Count how many times users have successfully logged into your Linux machine.

This command will display a count of successful logins to your Linux machine. jason-H55-USB3% grep ‘session opened’ /var/log/auth.log | wc -l 67jason-H55-USB3% grep ‘session opened’ /var/log/auth.log | wc -l 67 This will display a count of failed login attempts to your Linux machine. jason-H55-USB3% grep ‘FAILED LOGIN’ /var/log/auth.log | wc -l 3jason-H55-USB3% grep ‘FAILED LOGIN’ … Read more

How to find a file with the Linux command line.

The Linux command line is very useful for finding files, the find command is the best way to locate files on your filesystem. This is a simple example. knoppix@Microknoppix:~$ sudo find /proc -name "meminfo" /proc/meminfoknoppix@Microknoppix:~$ sudo find /proc -name "meminfo" /proc/meminfo Use the -maxdepth parameter to only search a certain number of levels deep into … Read more

Misc UNIX tips for the desktop UNIX or Linux user.

Ralph using a computer.

Get your uptime with the uptime command on Linux. Last login: Tue Oct 28 13:55:23 on ttys000 iMac05:~ admin$ uptime 11:24 up 111 days, 20:38, 2 users, load averages: 0.35 0.16 0.14Last login: Tue Oct 28 13:55:23 on ttys000 iMac05:~ admin$ uptime 11:24 up 111 days, 20:38, 2 users, load averages: 0.35 0.16 0.14 The … Read more

List hardware on your Linux system with some simple commands.

The lsdvb command will list all installed DVB hardware in your Linux system. Here it is showing my Realtek DVB stick. You need to use sudo to enable this command to gather more information. jason-H55-USB3 [lsdvb] ~/Documents jason-H55-USB3% sudo lsdvb   lsdvb: Simple utility to list PCI/PCIe DVB devices Version: 0.0.4 Copyright (C) Manu Abraham … Read more

Some very useful Gentoo Linux tips for using the emerge command to install software.

The emerge -atv emacs command will tell you what packages will be merged when installing a copy of Emacs on your Gentoo GNU/Linux system. ec2-user@ip-172-31-30-35 ~ $ sudo emerge -atv emacs   * IMPORTANT: 8 news items need reading for repository ‘gentoo’. * Use eselect news to read news items.     These are the … Read more

How to uninstall a package in Ubuntu.

To remove a package in Ubuntu, use the sudo apt-get remove command. This will uninstall the package. jason-H55-USB3 [mc] ~ 14-10-18 8:47PM jason-H55-USB3% sudo apt-get remove linphone Reading package lists… Done Building dependency tree Reading state information… Done The following packages were automatically installed and are no longer required: libexosip2-10 liblinphone5 libmediastreamer-base3 libortp9 libosip2-10 libupnp6 … Read more

Cool Linux tricks and hacks for the desktop and server user.

Using the shellshock bash bug on an iMac. iMac04:~ admin$ env VAR1=’me() {echo "hello"}\ ‘ /bin/echo "hello" helloiMac04:~ admin$ env VAR1=’me() {echo "hello"}\ ‘ /bin/echo "hello" hello Getting free hard disk space easily. iMac04:~ admin$ df -Hla Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk0s2 89G 64G 25G 73% 15757422 6089307 72% … Read more

Use iperf to check the bandwidth between two servers over the Internet.

The iperf utility is used to transfer data from one machine to another over the Internet. This is a client-server utility and is the go-to utility to test a Wide Area Network connection. To use this, type sudo apt-get install iperf. Then open port 5001 in your router and/or firewall to allow the incoming connection … Read more

A variant of the shellshock bug that still works with the bash 4.3.11 shell.

This is a variant of the shellshock bug for bash that still works on a patched system. I am using Ubuntu 14.04 and this still works for me. env VAR1=’me() {echo "hello"}\ ‘ /bin/touch /home/$LOGNAME/my.textenv VAR1=’me() {echo "hello"}\ ‘ /bin/touch /home/$LOGNAME/my.text So you can still put arbitrary content after the function definition in a bash … Read more

Shellshock bug a wake up call for all Linux users, but not the end of the world.

The shellshock bug for Linux is a wake up call for all Linux administrators and home users, but this is not the end of the world. The Linux distribution developers will issue patches very soon after a leak of a bug like this. There is not going to be a massive catastrophe that the media … Read more

Check if you are vulnerable to the shellshock bug. This is an easy way to find out.

A vulnerable cygwin shell. Using the shellshock vulnerability to run ls in cygwin. Homer@bejiitas ~ $ x='() { :;}; `/bin/ls -hula`’ bash -c : bash: total 53K drwxrwxr-x+ 1 Homer Homer 0 Sep 26 18:38 . drwxrwxrwt+ 1 Homer Homer 0 Sep 26 2013 .. -rw-rw—- 1 Homer Homer 222 Sep 26 2013 .bash_history -rwxrwxr-x … Read more

How to upload files to your Amazon AWS instance using the bash shell and sftp.

This is how to copy files from the local machine to your Amazon instance when you are logged into the EC2 instance via SSH. Firstly, connect to the remote AWS instance by SSH. Then use the sftp command to connect back to your local Linux machine. sftp -P 443 [email protected] -P 443 [email protected] Then, you … Read more