How to pronounce Linux
Internet newsgroup participants have long debated the proper pronunciation of Linux. Because the name Linux was conferred by Linux kernel author Linus Torvalds, his pronunciation of the word should reign as standard as I see it. However, Linus is Finnish and his pronunciation of Linux is difficult for English speakers to approximate. Consequently, many variations in pronunciation have arisen. The most popular pronunciation sounds as though the word were spelled Linnucks, with the stress on the first syllable.
You can hear how Linus Torvalds pronounces Linux:
Directory structure
- /boot: Boot loader files
- /etc: Configuration files
- /home: User home directories
- /root: Root home directory
- /opt: Third-party applications
- /dev: Device files
- /var: Variable files
- /bin: User binaries
- /sbin: System binaries
- /usr: User applications
- /proc: Process information
- /mnt: Mount directory
- /sys: Virtual file system
- /media: Removeable devices
- /run: Temporary file system
- /tmp: Temporary files
- /lost+found: Recover broken files
- /lib: System libraries
- /srv: Service data directory
Changing locale
Edit locale.gen and comment out the locale you need, for example tr_TR.UTF-8 UTF-8
|
|
Then run locale-gen
command for activation
|
|
Changing tzdata (time zone)
|
|
Listening live stream
|
|
Some internet radios
Converting video
|
|
Splitting video
|
|
where START is starting positing in seconds or in format hh:mm:ss LENGTH is the chunk length in seconds or in format hh:mm:ss
If let’s say your video is 31 minutes long and you want so split into 15 min chunks here is how you run it:
|
|
Commands
To set home directory
|
|
To set root gid and groups for the user1
|
|
To change access rights for a directory
|
|
To remove package with configuration files
|
|
To remove old configuration files
|
|
To combine .rar files using unrar
|
|
RarCrack
|
|
Creating symbolic link (There is no “/” sign at the end)
|
|
Burning an ISO image to CD-ROM
|
|
Removing kernel
|
|
Sources List, http://www.debian.org/doc/manuals/apt-howto/ch-basico.en.html
|
|
Trace a program (ex. pidgin)
|
|
nc
To check if a port is free, run the following command:
|
|
If the output of the command above is 1, then the port is free and usable.
xattr (extended attributes)
Delete ‘Where From’ metadata from files
|
|
You’ll get a key named com.apple.metadata:kMDItemWhereFroms. To delete this key in the Terminal, run:
|
|
Mount External HDD (NTFS)
Install ntfs-3g library
|
|
Shows all the disk drives
|
|
To make writable mount
|
|
Mount NTFS partition
umask is a filter of permissions, so it works in the opposite way to chmod. Full permissions are equivalent to 777 (rwxrwxrwx). A umask of 0222 (-w–w–w-) leaves 555 (r-xr-xr-x).
|
|
-rwxr-x— 1 dev dev 28096 Aug 24 1996 chkdsk.exe
|
|
To make writable mount
|
|
Mount an ISO image
Under UNIX and Linux like oses a loop device (a pseudo-device) can make a file accessible as a block device. It is is often used for CD / DVD ISO images and floppy disc images. Mounting a file containing a filesystem via such a loop mount makes the files within that filesystem accessible. They appear in the mount point directory.
Open terminal and create a mount point:
|
|
If your iso image is at /tmp/file.iso, type the following to mount it:
|
|
To unmount type the command:
|
|
Accurate Platform Detection
|
|
Network Testing Basics
Install netkit-ping, traceroute, dnsutils, ipchains (for 2.2 kernel), iptables (for 2.4 kernel), and net-tools packages and:
|
|
How to format a hard drive in linux
To create partition on hard drive B
|
|
Choose New, Primary and then Write and Quit
To format 1st partition on hard drive B
|
|
convert images to pdf
Use convert
program (it is an executable installed as part of Imagemagick
suite of tools):
|
|
Create favicon.ico
Using netpbm and GIMP
Install netpbm and GIMP
|
|
Step # 1: Convert logo to ppm raw format
- Open your logo using GIMP
- Now cut and paste logo in square
- Next resize logo by visiting Image > Scale image option. Set pixel size to 16 x 16 or 32 x 32 or 48 x 48.
- Next click on File > Save as > Enter file name as favicon.ppm > Click on Save > Raw Encoding > Ok
Step # 2: Convert portable pixmaps into a Windows .ico file
|
|
Using imagemagick
Install imagemagick first
|
|
and use convert tool
|
|
How to cycle through reverse-i-search in BASH?
To cycle through alternatives by repeatedly hitting Ctrl+R
E.g.:
|
|
Convert png image to jpg with white background
|
|
xattr
Using the xattr command, you can inspect the extended attributes:
|
|
and use the -d option to delete one extended attribute:
|
|
you can also use the -c option to remove all extended attributes:
|
|
Checking the SHA-256 checksum
You can compare the SHA-256 checksum of your downloaded binary against the checksums that are provided for every release. To generate a SHA-256 checksum of your downloaded binary, then open the corresponding checksum file and ensure that it contains the same number.
|
|
Getting all files from a web page using wget
For downloading files from a directory listing, use -r
(recursive), -np
(don’t follow links to parent directories), and -k
to make links in downloaded HTML or CSS point to local files
|
|
Other useful options:
- -nd (no directories): download all files to the current directory
- -e robots.off: ignore robots.txt files, don’t download robots.txt files
- -A png,jpg: accept only files with the extensions png or jpg
- -m (mirror): -r –timestamping –level inf –no-remove-listing
- -nc, –no-clobber: Skip download if files exist
How to Format a USB Stick
To find out which disk is your USB drive
|
|
If the disk is /dev/disk2
, to format the disk
|
|
How to Make a Bootable USB Stick from an ISO File
from Mac
- Download the desired file
- Convert the .iso file to .img using the convert option of
hdiutil
:
|
|
Note: OS X tends to put the .dmg ending on the output file automatically. Rename the file by typing:
|
|
-
Run
diskutil list
to get the current list of devices -
Insert your flash media 5 .Run
diskutil list
again and determine the device node assigned to your flash media (e.g. /dev/disk2) -
Run
diskutil unmountDisk /dev/diskN
(replace N with the disk number from the last command - in the previous example, N would be 2) -
Execute
sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m
(replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
Note: Using /dev/rdisk instead of /dev/disk may be faster.
Note: If you see the error dd: Invalid number ‘1m’, you are using GNU dd. Use the same command but replace bs=1m with bs=1M.
Note: If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the ‘Disk Utility.app’ and unmount (don’t eject) the drive.
- Run
diskutil eject /dev/diskN
and remove your flash media when the command completes
Now the USB stick is ready. Boot the device that you want from the USB stick.
sha3sum: Keccak, SHA-3, SHAKE, and RawSHAKE checksum utilities
|
|
Log Parsing Cheat Sheet
Finding and counting duplicate filenames
|
|