Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Commands
- lsb_release -a
- #OS and distribution information.
- dmesg|grep WORD
- #Boot messages piped, where “WORD” is the search subject.
- cat /var/log/Xorg.0.log|grep EE
- #list errors for the X Window System.
- lsusb -- list usb devices
- lshw -- list more detailed hardware information of your system including chipsets, motherboard manufacturer, RAM details, etc (I had to install this separately from the Debian repos)
- alien -iv: [package name] alien converts .rpm to .deb
- du -ch: /path/to/folder check file or directory size in total
- amount and in human-readable terms.
- dpkg-reconfigure fontconfig-config: font quality check
- grub-install:*install grub on your drive*
- dmesg | more: shows boot-up messages
- module-assistant:*module-assistant is the command-line tool for
- handling module-source packages that have been prepared for the Debian distribution. It helps users to build and install module package(s) easily for one or more custom kernels.
- lsmod: lists loaded kernel modules
- lspci: lists info on hardware lshw lists more detail and apt-get install hwinfo for another good tool. mkxf86config for monitor capabilities
- umask: set in env.vars. (.bashrc?). Decide what your default environmental file permissions should be for thinks such as touch and text editors. Ex. U: 7 G: 5 O:0. Subtract this number from 777 and the result (027), is your umask
- whatis: microscopic man page. Form: whatis mkdir
- cmp: create a file, modify it and save it as a different file. use cmp to compare the differences between the two files
- df -Th: report file system disk space usage
- more /proc/cpuinfo: shows info on the cpu
- ddcprobe: monitor info
- modprobe “device” **modprobe intelligently adds or removes a module from the Linux kernel: note that for convenience, there is no difference between _ and - in module names
- update-alternatives --config (item) check in /etc/alternatives for list.
- alsamixer: sound input/output config gdebi
- checkinstall: (run in the root directory of a package source tree). checkinstall -D turns most source into a .deb (use dpkg -i to install). The -R option turns it into a .rpm package
- tar jxvf: unpacks .tar .bz package in one fell swoop
- dpkg -l package* | grep -i ^ii example, lists actual package name so it can be removed (in this case by dpkg)
- uname -a finds kernel version
- readlink: display value of a symbolic link. The following example shows which driver module controls the eth0 device:
- readlink /sys/class/net/eth1/device/driver/module
- cat /proc/cpuinfo: *cpu info
- apt-get moo: *just kinda fun
- ifconfig [interface]*up/down: brings specified nic on or off line
- top: shows real-time cpu usage by process. -U username for specific user
- apropos: info on man pages- very cool*
- stat [filename]: verbose info on files
- dpkg --list: shows all dpkg installed packages
- df -h or better yet fdisk -l:*List hard drive info/names
- ctrl-alt-backspace: kills xserver
- runlevel: shows current runlevel
- telinit x: change runlevel
- sysv-rc-conf: start/stop specifications for init scripts by runlevel. You can also go to the /etc/runlevel and replace the “S” with a “K”
- update-grub: updates grub boot menu
- sudo blkid /dev/sda | grep PTTYPE : tells drive partition type like gpt or msdos
- gcc --version: gnu compiler version
- tzselect:* sets timezone
- pmount: ("policy mount") is a wrapper around the standard mount program which permits normal users to mount removable devices without a matching /etc/fstab entry
- pstree [process]:*display a tree of processes
- dhclient: requests and renews dhcp address from dhcp server
- -----------------------------------------------------------------------------------------------------------------------
- Get into root
- sudo -i
- sudo bash
- sudo su -
- sudo su
- sudo apt-get autoclean to clean out dead files
- Find file type in Linux on Mounted Partiton::: _df -T
- Root Access to Nautiless File Manager::::::::::::gksu nautilus &
- ______________________________________________________________________________________________________________________----------------------------------------------------------------------------------------------------------------------------
- cat /etc/issue to find out what distro u are using
- cat /proc/version
- dmesg | head -1
- lsb_release -a
- ________________________________________________________________________________________________________________________----------------------------------------------------------------------------------------------------------------------------
- If it is a built-in or PCI wireless, use this command to determine the card info:lspci -nn
- For Fedora:/sbin/lspci -nn
- If it is a USB wireless, use this command. It will not give as much info as for a PCI card, but it is useful anyway:lsusb
- For Fedora:/sbin/lsusb
- To see a list of all driver modules that your system is loading, use this command. I usually can spot a wireless driver in the list:lsmod
- To see any error codes that your system may have generated concerning the wireless, enter this command.:dmesg
- Post any relevant wireless messages or wlan errors in your thread. Many cards require firmware to be loaded before they will work, so look for firmware errors in the dmesg output. A command that will only give firmware messages can be used:
- dmesg | grep firmware
- #also
- echo uname: && uname -a -m -p && echo lspci: && lspci && echo lsusb: && lsusb && echo lsmod: && lsmod && echo ifconfig: && ifconfig && echo ifconfig -a: && ifconfig -a && echo iwconfig: && iwconfig && echo resolv.conf: && cat /etc/resolv.conf && echo route: && route -n
- su -c "hwinfo --wlan"
- lspci -nnk | grep -i net -A2
- su -c "hwinfo --netcard"
- ________________________________________________________________________________________________________________________
- The Linux distribution and version can be useful, as well as the kernel version. To obtain the kernel version, use this command.: uname -r
- ______________________________________________________________________________________________________________________
- For wiping the MBR only, use this command: dd if=/dev/zero of=/dev/sda bs=446 count=1
- For wiping the entire drive, go with this command:dd if=/dev/zero of=/dev/sda bs=512 count=1
- ______________________________________________________________________________________________________________________
- e: sudo apt-get remove (instead of install, just taking a chance here) xserver-xorg and that worked to remove the whole thing then: 'sudo apt-get install xserver-xorg' and it worked like a charm!
- ________________________________________________________________________________________________________________________
- To Open Wajig type gjig in terminal
- _________________________________________________________________________________________________________________________
- To empty root file in trash type sudo rm -rf ~/.local/share/Trash/files/*
- --------------------------------------------------------------------------------------------------------------------------
- To compile kernel modules, you need to install a few things first.
- kernel-devel (kernel source)
- kernel-headers
- gcc
- make
- __________________
- Paul
- _______________________________________________________________________________________________________________________
- Manually mount and unmount USB MP3 Player (No other Flashdrives Plugged in)
- sudo mount -t vfat -o rw,umask=0 /dev/sdb1 /media/USB
- Will mount the device Read/Write and give full access to all users as if they were root. Don't forget that with a manual mount, you must manually unmount before disconnecting or you risk data corruption and a possible device hang (on the computer, not the stick). You will also need to do this before remounting the device (or there is an alternate method, but it's simpler for me to explain it this way).
- sudo umount /dev/sdb1
- _________________________________________________________________________________________________________________
- ________________________________________________________________________________
- ########blacklist############
- sudo tee /etc/modprobe.d/blacklist <item to be blacklisted goes here>
- __________________________________________________________________________________________________________________
- #############When I want to certain info on how many cores I am running###########
- grep 'model name' /proc/cpuinfo|sed -e 's/model name.*: //'|uniq
- __________________________________________________________________________________________________________________________________
- ######record desktop####################
- ffmpeg -f x11grab -s 1024x768 -r 24 -an -threads 2 -sameq -i :0.0 screencast.avi
- ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -s 1366x768 -r 25 -i :0.0 -sameq /home/harry/Video/test2.avi
- _____________________________________________________________________________________________________________________________________
- Hold down the Alt and SysRq (Print Screen) keys.
- While holding those down, type the following keys in order, several seconds apart: REISUB
- Computer should reboot.
- Also
- Alt+PrintScreen+K
- To kill X.
- __________________________________________________________________________________________________________________________________________________
- ########Test Webcam in Terminal################
- mplayer tv://
- ####################################Find dependencies in a package install####################################
- apt-cache show <package name goes here> | grep ^Depends | sed 's/, /\n/g;s/^Depends: //' | sort -u
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement